title: How to start dbus with a fixed address?

text: The issue concerns the same thing which is described here and here, but I don't see a clear solution there. I mean I have the same error:               Failed to connect to socket /tmp/dbus-CwQMg2RxWx: Connection refused      and this is because I restarted my openbox session without restarting `tmux` . Gilles mentioned that I should: > start `dbus-daemon` explicitly early in your X session startup and give it a > fixed address like `unix:path=~/.dbus-$HOSTNAME-$DISPLAY`. but I don't really know where to put this address. When I check dbus processes in my system, I get something like this:               $ ps -eo user,group,args | grep -i dbus     morfik   morfik   ck-launch-session dbus-launch --sh-syntax --exit-with-session openbox-session     morfik   morfik   dbus-launch --sh-syntax --exit-with-session openbox-session     morfik   morfik   /usr/bin/dbus-daemon --fork --print-pid 5 --print-address 7 --session     message+ message+ /usr/bin/dbus-daemon --system     morfik   morfik   grep --color=auto -i dbus      Now I'm using just `starx` command to start X-server, I don't use lightdm anymore. **UPDATE#1** I finally managed to start dbus with a fixed address. The line should look like this:               unix:path=/home/morfik/.dbus/.dbus-morfikownia-0      I couldn't use `:` or `~` in the patch. But there's a problem.               Feb 14 07:24:29 morfikownia pulseaudio[6979]: [pulseaudio] core-util.c: Failed to connect to system bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory     Feb 14 07:24:29 morfikownia pulseaudio[6979]: [pulseaudio] core-util.c: Failed to connect to system bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory     Feb 14 07:24:29 morfikownia pulseaudio[6979]: [pulseaudio] core-util.c: Failed to connect to system bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory     Feb 14 07:24:29 morfikownia pulseaudio[6979]: [pulseaudio] core-util.c: Failed to connect to system bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory     Feb 14 07:24:29 morfikownia pulseaudio[6979]: [pulseaudio] core-util.c: Failed to connect to system bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory     Feb 14 07:24:29 morfikownia pulseaudio[6979]: [pulseaudio] core-util.c: Failed to connect to system bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory     Feb 14 07:24:29 morfikownia pulseaudio[6979]: [pulseaudio] core-util.c: Failed to connect to system bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory     Feb 14 07:24:29 morfikownia pulseaudio[6979]: [pulseaudio] core-util.c: Failed to connect to system bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory     Feb 14 07:24:29 morfikownia pulseaudio[6979]: [pulseaudio] core-util.c: Failed to connect to system bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory     Feb 14 07:24:29 morfikownia pulseaudio[6979]: [pulseaudio] core-util.c: Failed to connect to system bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory     Feb 14 07:24:29 morfikownia pulseaudio[6979]: [pulseaudio] core-util.c: Failed to connect to system bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory     Feb 14 07:24:29 morfikownia pulseaudio[6979]: [pulseaudio] sink.c: Default and alternate sample rates are the same.     Feb 14 07:24:29 morfikownia pulseaudio[6979]: [alsa-sink-ca0106] core-util.c: Failed to connect to system bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory     Feb 14 07:24:29 morfikownia pulseaudio[6979]: [alsa-sink-ca0106] core-util.c: Failed to connect to system bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory     Feb 14 07:24:29 morfikownia pulseaudio[6979]: [alsa-sink-ca0106] core-util.c: Failed to connect to system bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory     Feb 14 07:24:29 morfikownia pulseaudio[6979]: [alsa-sink-ca0106] core-util.c: Failed to connect to system bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory     Feb 14 07:24:29 morfikownia pulseaudio[6979]: [alsa-sink-ca0106] core-util.c: Failed to connect to system bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory     Feb 14 07:24:29 morfikownia pulseaudio[6979]: [pulseaudio] source.c: Default and alternate sample rates are the same.     Feb 14 07:24:29 morfikownia pulseaudio[6979]: [alsa-source-ca0106] core-util.c: Failed to connect to system bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory     Feb 14 07:24:29 morfikownia pulseaudio[6979]: [alsa-source-ca0106] core-util.c: Failed to connect to system bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory     Feb 14 07:24:29 morfikownia pulseaudio[6979]: [alsa-source-ca0106] core-util.c: Failed to connect to system bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory     Feb 14 07:24:29 morfikownia pulseaudio[6979]: [alsa-source-ca0106] core-util.c: Failed to connect to system bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory     Feb 14 07:24:29 morfikownia pulseaudio[6979]: [alsa-source-ca0106] core-util.c: Failed to connect to system bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory     Feb 14 07:24:29 morfikownia pulseaudio[6979]: [pulseaudio] module-console-kit.c: Unable to contact D-Bus system bus: org.freedesktop.DBus.Error.FileNotFound: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory     Feb 14 07:24:29 morfikownia pulseaudio[6979]: [pulseaudio] module.c: Failed to load module "module-console-kit" (argument: ""): initialization failed.     Feb 14 07:24:29 morfikownia pulseaudio[6979]: [pulseaudio] main.c: Module load failed.     Feb 14 07:24:29 morfikownia pulseaudio[6979]: [pulseaudio] main.c: Failed to initialize daemon.      Now, I have the following dbus processes:               morfik:~$ ps -eo user,group,args | grep -i dbus     message+ message+ /usr/bin/dbus-daemon --system --address=unix:path=/home/morfik/.dbus/.dbus-morfikownia-0     morfik   morfik   dbus-launch --sh-syntax --exit-with-session openbox-session     morfik   morfik   /usr/bin/dbus-daemon --fork --print-pid 5 --print-address 7 --session     morfik   morfik   grep --color=auto -i dbus      But the DBUS_SESSION_BUS_ADDRESS is still being set to a random value:               morfik:~$ env | grep -i dbus     DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-W0pGpHoLOW,guid=20f83c74a8f5cef7e95ba8cb52fdb5cd      I changed it to               morfik:~$ export DBUS_SESSION_BUS_ADDRESS=unix:path=/home/morfik/.dbus/.dbus-morfikownia-0      to see what will happen, and for testing I used `xfce4-notifyd-config` and it still works. So, I checked another address:               morfik:~$ export DBUS_SESSION_BUS_ADDRESS=unix:path=/home/morfik/.dbus/.dbus-morfikownia-01      and it gave the error:               Failed to connect to socket /home/morfik/.dbus/.dbus-morfikownia-01: No such file or director      I placed the following line in `/home/morfik/.config/openbox/environment` :               export DBUS_SESSION_BUS_ADDRESS="unix:path=/home/morfik/.dbus/.dbus-morfikownia-0"      and I can start `xfce4-notifyd-config` in tmux without a problem now, but pulseaudio doesn't work. There's also some other issues. When I start firefox, I got the following error:               An error occurred while loading or saving configuration information for firefox. Some of your configuration settings may not work properly.          Failed to activate configuration server: The name org.gnome.GConf was not provided by any .service files          Failed to activate configuration server: The name org.gnome.GConf was not provided by any .service files          Failed to activate configuration server: The name org.gnome.GConf was not provided by any .service files          Failed to activate configuration server: The name org.gnome.GConf was not provided by any .service files      So, the solution with `\--address` works partially, and I think it causes more harm than good. Maybe is there something else that has to be done?


title: NVIDIA driver upgrade failed

text: I downloaded the latest(331.49), tried to install, but failed. I compiled the kernel module and at the end of the installation it said that it went successful. But on bootup it said: version mismatch, it still finds the old version—so I tried to revert back to 304.88 (previous driver that worked fine) but that failed as well, it can't build the kernel module. I'm left on the console now. When trying 331.49 again: LICENSE question - **Accept**   There apppears to already be a driver (304.88), overwrite & continue? - **Yes** The distribution-provided pre-install script failed! Continue? - **Yes**   Would you like to register DKMS? - **Yes** (also tried No here, no difference in the end) Install 32-bit compatible libraries? - **No** (had selected Yes previously)   now it's downloading and installing DKMS   Run xxvidia-xconfig ? - **Yes**   Your X config file has been updated succesfully! Installation of 331.49 is now complete - **OK**   back to shell:   `# service lightdm start`   Just shows a black screen with a blinking cursor in the top left... How do I go about fixing this? Oh yeah, here's a copy of the nvidia-installer.log:               nvidia-installer log file '/var/log/nvidia-installer.log'     creation time: Wed Mar 12 04:55:01 2014     installer version: 331.49          PATH: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/reg/android-sdk-linux/tools:/home/reg/android-sdk-linux/platform-tools          nvidia-installer command line:         ./nvidia-installer          Using: nvidia-installer ncurses user interface     -> License accepted.     -> Installing NVIDIA driver version 331.49.     -> There appears to already be a driver installed on your system (version: 304.88).  As part of installing this driver (version: 331.49), the existing driver will be uninstalled.  Are you sure you want to continue? ('no' will abort installation) (Answer: Yes)     -> Running distribution scripts        executing: '/usr/lib/nvidia/pre-install'...     -> done.     -> The distribution-provided pre-install script failed!  Continue installation anyway? (Answer: Yes)     -> Would you like to register the kernel module sources with DKMS? This will allow DKMS to automatically build a new module, if you install a different kernel later. (Answer: Yes)     -> Installing both new and classic TLS OpenGL libraries.     -> Installing both new and classic TLS 32bit OpenGL libraries.     -> Install NVIDIA's 32-bit compatibility libraries? (Answer: No)     -> Parsing log file:     -> done.     -> Validating previous installation:     -> done.     -> Uninstalling NVIDIA Accelerated Graphics Driver for Linux-x86_64 (1.0-30488 (304.88)):     -> DKMS module detected; removing...     -> done.     -> Uninstallation of existing driver: NVIDIA Accelerated Graphics Driver for Linux-x86_64 (304.88) is complete.     -> Skipping installation of the libvdpau wrapper library.     -> Searching for conflicting X files:     -> done.     -> Searching for conflicting OpenGL files:     -> done.     -> Installing 'NVIDIA Accelerated Graphics Driver for Linux-x86_64' (331.49):        executing: '/sbin/ldconfig'...        executing: '/sbin/depmod -aq'...        ignored deprecated option -q     -> done.     -> Driver file installation is complete.     -> Installing DKMS kernel module:     -> done.     -> Running post-install sanity check:     -> done.     -> Post-install sanity check passed.     -> Shared memory test passed.     -> Running runtime sanity check:     -> done.     -> Runtime sanity check passed.     -> Would you like to run the nvidia-xconfig utility to automatically update your X configuration file so that the NVIDIA X driver will be used when you restart X?  Any pre-existing X configuration file will be backed up. (Answer: Yes)     -> Your X configuration file has been successfully updated.  Installation of the NVIDIA Accelerated Graphics Driver for Linux-x86_64 (version: 331.49) is now complete.      /var/log/Xorg.0.log:               [ 32031.608]      X.Org X Server 1.14.5     Release Date: 2013-12-12     [ 32031.609] X Protocol Version 11, Revision 0     [ 32031.609] Build Operating System: Linux 3.2.0-37-generic x86_64 Ubuntu     [ 32031.609] Current Operating System: Linux regDesktopHome 3.11.0-18-generic #32-Ubuntu SMP Tue Feb 18 21:11:14 UTC 2014 x86_64     [ 32031.610] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-3.11.0-18-generic root=UUID=b0488ebc-79a6-49dc-b86f-fd3d9b1d746a ro quiet splash     [ 32031.610] Build Date: 17 December 2013  10:06:15AM     [ 32031.610] xorg-server 2:1.14.5-1ubuntu2~saucy1 (For technical support please see http://www.ubuntu.com/support)      [ 32031.611] Current version of pixman: 0.30.2     [ 32031.611]    Before reporting problems, check http://wiki.x.org         to make sure that you have the latest version.     [ 32031.611] Markers: (--) probed, (**) from config file, (==) default setting,         (++) from command line, (!!) notice, (II) informational,         (WW) warning, (EE) error, (NI) not implemented, (??) unknown.     [ 32031.613] (==) Log file: "/var/log/Xorg.0.log", Time: Wed Mar 12 13:14:48 2014     [ 32031.613] (==) Using config file: "/etc/X11/xorg.conf"     [ 32031.613] (==) Using system config directory "/usr/share/X11/xorg.conf.d"     [ 32031.614] (==) ServerLayout "Layout0"     [ 32031.614] (**) |-->Screen "Screen0" (0)     [ 32031.614] (**) |   |-->Monitor "Monitor0"     [ 32031.614] (**) |   |-->Device "Device0"     [ 32031.614] (**) |-->Screen "Screen1" (1)     [ 32031.614] (**) |   |-->Monitor "Monitor1"     [ 32031.614] (**) |   |-->Device "Device1"     [ 32031.614] (**) |-->Input Device "Keyboard0"     [ 32031.614] (**) |-->Input Device "Mouse0"     [ 32031.614] (**) Option "Xinerama" "1"     [ 32031.614] (==) Automatically adding devices     [ 32031.614] (==) Automatically enabling devices     [ 32031.614] (==) Automatically adding GPU devices     [ 32031.614] (**) Xinerama: enabled     [ 32031.614] (WW) The directory "/usr/share/fonts/X11/cyrillic" does not exist.     [ 32031.614]    Entry deleted from font path.     [ 32031.614] (WW) The directory "/usr/share/fonts/X11/100dpi/" does not exist.     [ 32031.614]    Entry deleted from font path.     [ 32031.614] (WW) The directory "/usr/share/fonts/X11/75dpi/" does not exist.     [ 32031.614]    Entry deleted from font path.     [ 32031.614] (WW) The directory "/usr/share/fonts/X11/100dpi" does not exist.     [ 32031.614]    Entry deleted from font path.     [ 32031.614] (WW) The directory "/usr/share/fonts/X11/75dpi" does not exist.     [ 32031.614]    Entry deleted from font path.     [ 32031.614] (==) FontPath set to:         /usr/share/fonts/X11/misc,         /usr/share/fonts/X11/Type1,         built-ins     [ 32031.614] (==) ModulePath set to "/usr/lib/x86_64-linux-gnu/xorg/extra-modules,/usr/lib/xorg/extra-modules,/usr/lib/xorg/modules"     [ 32031.614] (**) Extension "Composite" is disabled     [ 32031.614] (WW) Hotplugging is on, devices using drivers 'kbd', 'mouse' or 'vmmouse' will be disabled.     [ 32031.615] (WW) Disabling Keyboard0     [ 32031.615] (WW) Disabling Mouse0     [ 32031.615] (II) Loader magic: 0x7f1f5aa92d20     [ 32031.615] (II) Module ABI versions:     [ 32031.615]    X.Org ANSI C Emulation: 0.4     [ 32031.615]    X.Org Video Driver: 14.1     [ 32031.615]    X.Org XInput driver : 19.1     [ 32031.615]    X.Org Server Extension : 7.0     [ 32031.616] (--) PCI:*(0:1:0:0) 10de:1040:1043:83c6 rev 161, Mem @ 0xfa000000/16777216, 0xe8000000/134217728, 0xf0000000/33554432, I/O @ 0x0000e000/128, BIOS @ 0x????????/524288     [ 32031.616] (II) Open ACPI successful (/var/run/acpid.socket)     [ 32031.616] Initializing built-in extension Generic Event Extension     [ 32031.616] Initializing built-in extension SHAPE     [ 32031.616] Initializing built-in extension MIT-SHM     [ 32031.617] Initializing built-in extension XInputExtension     [ 32031.617] Initializing built-in extension XTEST     [ 32031.617] Initializing built-in extension BIG-REQUESTS     [ 32031.617] Initializing built-in extension SYNC     [ 32031.617] Initializing built-in extension XKEYBOARD     [ 32031.618] Initializing built-in extension XC-MISC     [ 32031.618] Initializing built-in extension SECURITY     [ 32031.618] Initializing built-in extension XINERAMA     [ 32031.618] Initializing built-in extension XFIXES     [ 32031.618] Initializing built-in extension RENDER     [ 32031.619] Initializing built-in extension RANDR     [ 32031.619] Initializing built-in extension COMPOSITE     [ 32031.619] Initializing built-in extension DAMAGE     [ 32031.619] Initializing built-in extension MIT-SCREEN-SAVER     [ 32031.619] Initializing built-in extension DOUBLE-BUFFER     [ 32031.619] Initializing built-in extension RECORD     [ 32031.620] Initializing built-in extension DPMS     [ 32031.620] Initializing built-in extension X-Resource     [ 32031.620] Initializing built-in extension XVideo     [ 32031.620] Initializing built-in extension XVideo-MotionCompensation     [ 32031.620] Initializing built-in extension SELinux     [ 32031.621] Initializing built-in extension XFree86-VidModeExtension     [ 32031.621] Initializing built-in extension XFree86-DGA     [ 32031.621] Initializing built-in extension XFree86-DRI     [ 32031.621] Initializing built-in extension DRI2     [ 32031.621] (II) "glx" will be loaded by default.     [ 32031.621] (WW) "xmir" is not to be loaded by default. Skipping.     [ 32031.621] (II) LoadModule: "dri2"     [ 32031.621] (II) Module "dri2" already built-in     [ 32031.621] (II) LoadModule: "glamoregl"     [ 32031.621] (WW) Warning, couldn't open module glamoregl     [ 32031.621] (II) UnloadModule: "glamoregl"     [ 32031.621] (II) Unloading glamoregl     [ 32031.621] (EE) Failed to load module "glamoregl" (module does not exist, 0)     [ 32031.621] (II) LoadModule: "glx"     [ 32031.622] (II) Loading /usr/lib/xorg/modules/extensions/libglx.so     [ 32031.628] (II) Module glx: vendor="NVIDIA Corporation"     [ 32031.628]    compiled for 4.0.2, module version = 1.0.0     [ 32031.628]    Module class: X.Org Server Extension     [ 32031.628] (II) NVIDIA GLX Module  331.49  Wed Feb 12 20:17:10 PST 2014     [ 32031.628] Loading extension GLX     [ 32031.628] (II) LoadModule: "nvidia"     [ 32031.628] (II) Loading /usr/lib/xorg/modules/drivers/nvidia_drv.so     [ 32031.628] (II) Module nvidia: vendor="NVIDIA Corporation"     [ 32031.628]    compiled for 4.0.2, module version = 1.0.0     [ 32031.628]    Module class: X.Org Video Driver     [ 32031.628] (II) NVIDIA dlloader X Driver  331.49  Wed Feb 12 19:57:36 PST 2014     [ 32031.628] (II) NVIDIA Unified Driver for all Supported NVIDIA GPUs     [ 32031.628] (--) using VT number 7          [ 32031.632] (II) Loading sub module "fb"     [ 32031.632] (II) LoadModule: "fb"     [ 32031.633] (II) Loading /usr/lib/xorg/modules/libfb.so     [ 32031.633] (II) Module fb: vendor="X.Org Foundation"     [ 32031.633]    compiled for 1.14.5, module version = 1.0.0     [ 32031.633]    ABI class: X.Org ANSI C Emulation, version 0.4     [ 32031.633] (WW) Unresolved symbol: fbGetGCPrivateKey     [ 32031.633] (II) Loading sub module "wfb"     [ 32031.633] (II) LoadModule: "wfb"     [ 32031.633] (II) Loading /usr/lib/xorg/modules/libwfb.so     [ 32031.633] (II) Module wfb: vendor="X.Org Foundation"     [ 32031.633]    compiled for 1.14.5, module version = 1.0.0     [ 32031.633]    ABI class: X.Org ANSI C Emulation, version 0.4     [ 32031.633] (II) Loading sub module "ramdac"     [ 32031.633] (II) LoadModule: "ramdac"     [ 32031.633] (II) Module "ramdac" already built-in     [ 32031.633] (WW) NVIDIA: Xinerama is enabled, so RandR has likely been disabled by the     [ 32031.633] (WW) NVIDIA:     X server.     [ 32031.634] (**) NVIDIA(0): Depth 24, (--) framebuffer bpp 32     [ 32031.634] (==) NVIDIA(0): RGB weight 888     [ 32031.634] (==) NVIDIA(0): Default visual is TrueColor     [ 32031.634] (==) NVIDIA(0): Using gamma correction (1.0, 1.0, 1.0)     [ 32031.634] (**) NVIDIA(0): Option "TwinViewXineramaInfoOrder" "DFP-0"     [ 32031.634] (**) NVIDIA(0): Option "MetaModes" "DFP: nvidia-auto-select +0+0"     [ 32031.634] (**) NVIDIA(1): Option "MetaModes" "CRT: nvidia-auto-select +0+0"     [ 32031.634] (**) NVIDIA(0): Enabling 2D acceleration     [ 32031.634] (EE) NVIDIA(0): Failed to initialize the NVIDIA kernel module. Please see the     [ 32031.634] (EE) NVIDIA(0):     system's kernel log for additional error messages and     [ 32031.634] (EE) NVIDIA(0):     consult the NVIDIA README for details.     [ 32031.634] (EE) NVIDIA(0):  *** Aborting ***     [ 32031.634] (EE) NVIDIA(0): Failing initialization of X screen 0     [ 32031.634] (**) NVIDIA(1): Depth 24, (--) framebuffer bpp 32     [ 32031.634] (==) NVIDIA(1): RGB weight 888     [ 32031.634] (==) NVIDIA(1): Default visual is TrueColor     [ 32031.635] (==) NVIDIA(1): Using gamma correction (1.0, 1.0, 1.0)     [ 32031.635] (**) NVIDIA(1): Option "TwinViewXineramaInfoOrder" "CRT-1"     [ 32031.635] (EE) NVIDIA(1): Failed to initialize the NVIDIA kernel module. Please see the     [ 32031.635] (EE) NVIDIA(1):     system's kernel log for additional error messages and     [ 32031.635] (EE) NVIDIA(1):     consult the NVIDIA README for details.     [ 32031.635] (EE) NVIDIA(1):  *** Aborting ***     [ 32031.635] (EE) NVIDIA(1): Failing initialization of X screen 1     [ 32031.635] (II) UnloadModule: "nvidia"     [ 32031.635] (II) UnloadSubModule: "wfb"     [ 32031.635] (II) UnloadSubModule: "fb"     [ 32031.635] (II) UnloadModule: "nvidia"     [ 32031.635] (II) UnloadSubModule: "wfb"     [ 32031.635] (II) UnloadSubModule: "fb"     [ 32031.635] (EE) Screen(s) found, but none have a usable configuration.     [ 32031.635] (EE)      Fatal server error:     [ 32031.635] (EE) no screens found(EE)      [ 32031.635] (EE)      Please consult the The X.Org Foundation support           at http://wiki.x.org      for help.      [ 32031.635] (EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information.     [ 32031.635] (EE)      [ 32031.639] (EE) Server terminated with error (1). Closing log file      and my /etc/X11/xorg.conf:               # nvidia-xconfig: X configuration file generated by nvidia-xconfig     # nvidia-xconfig:  version 331.49  (buildmeister@swio-display-x86-rhel47-10)  Wed Feb 12 21:00:07 PST 2014          # nvidia-settings: X configuration file generated by nvidia-settings     # nvidia-settings:  version 295.40  (buildmeister@swio-display-x86-rhel47-06.nvidia.com)  Thu Apr  5 22:40:34 PDT 2012     # commented out by ubuntu-release-upgrader, HAL is now used and auto-detects devices     # Keyboard settings are now read from /etc/default/console-setup     #Section "InputDevice"     #     #    # generated from default     #    Identifier     "Mouse0"     #    Driver         "mouse"     #    Option         "Protocol" "auto"     #    Option         "Device" "/dev/psaux"     #    Option         "Emulate3Buttons" "no"     #    Option         "ZAxisMapping" "4 5"     #EndSection     # commented out by ubuntu-release-upgrader, HAL is now used and auto-detects devices     # Keyboard settings are now read from /etc/default/console-setup     #Section "InputDevice"     #     #    # generated from default     #    Identifier     "Keyboard0"     #    Driver         "kbd"     #EndSection          Section "ServerLayout"          # Removed Option "Xinerama" "0"     # commented out by ubuntu-release-upgrader, HAL is now used and auto-detects devices     # Keyboard settings are now read from /etc/default/console-setup     #    InputDevice    "Keyboard0" "CoreKeyboard"     # commented out by ubuntu-release-upgrader, HAL is now used and auto-detects devices     # Keyboard settings are now read from /etc/default/console-setup     #    InputDevice    "Mouse0" "CorePointer"         Identifier     "Layout0"         Screen      0  "Screen0" 0 0         Screen      1  "Screen1" RightOf "Screen0"         InputDevice    "Keyboard0" "CoreKeyboard"         InputDevice    "Mouse0" "CorePointer"         Option         "Xinerama" "1"     EndSection          Section "Files"     EndSection          Section "InputDevice"              # generated from default         Identifier     "Keyboard0"         Driver         "keyboard"     EndSection          Section "InputDevice"              # generated from default         Identifier     "Mouse0"         Driver         "mouse"         Option         "Protocol" "auto"         Option         "Device" "/dev/psaux"         Option         "Emulate3Buttons" "no"         Option         "ZAxisMapping" "4 5"     EndSection          Section "Monitor"         Identifier     "Monitor0"         VendorName     "Unknown"         ModelName      "HP 2511"         HorizSync       24.0 - 94.0         VertRefresh     50.0 - 76.0         Option         "DPMS"     EndSection          Section "Monitor"         Identifier     "Monitor1"         VendorName     "Unknown"         ModelName      "Acer AL2216W"         HorizSync       30.0 - 82.0         VertRefresh     56.0 - 76.0     EndSection          Section "Device"         Identifier     "Device0"         Driver         "nvidia"         VendorName     "NVIDIA Corporation"         BoardName      "GeForce GT 520"         BusID          "PCI:1:0:0"         Screen          0     EndSection          Section "Device"         Identifier     "Device1"         Driver         "nvidia"         VendorName     "NVIDIA Corporation"         BoardName      "GeForce GT 520"         BusID          "PCI:1:0:0"         Screen          1     EndSection          Section "Screen"         Identifier     "Screen0"         Device         "Device0"         Monitor        "Monitor0"         DefaultDepth    24         Option         "TwinView" "0"         Option         "TwinViewXineramaInfoOrder" "DFP-0"         Option         "metamodes" "DFP: nvidia-auto-select +0+0"         SubSection     "Display"             Depth       24         EndSubSection     EndSection          Section "Screen"         Identifier     "Screen1"         Device         "Device1"         Monitor        "Monitor1"         DefaultDepth    24         Option         "TwinView" "0"         Option         "TwinViewXineramaInfoOrder" "CRT-1"         Option         "metamodes" "CRT: nvidia-auto-select +0+0"         SubSection     "Display"             Depth       24         EndSubSection     EndSection          Section "Extensions"         Option         "Composite" "Disable"     EndSection      **edit 1** /var/log/kern.log:               Mar 13 03:02:27 regDesktopHome kernel: [   38.472421] NVRM: API mismatch: the client has the version 331.49, but     Mar 13 03:02:27 regDesktopHome kernel: [   38.472421] NVRM: this kernel module has the version 304.88.  Please     Mar 13 03:02:27 regDesktopHome kernel: [   38.472421] NVRM: make sure that this kernel module and all NVIDIA driver     Mar 13 03:02:27 regDesktopHome kernel: [   38.472421] NVRM: components have the same version.     Mar 13 03:03:27 regDesktopHome kernel: [   99.254399] NVRM: API mismatch: the client has the version 331.49, but     Mar 13 03:03:27 regDesktopHome kernel: [   99.254399] NVRM: this kernel module has the version 304.88.  Please     Mar 13 03:03:27 regDesktopHome kernel: [   99.254399] NVRM: make sure that this kernel module and all NVIDIA driver     Mar 13 03:03:27 regDesktopHome kernel: [   99.254399] NVRM: components have the same version.     Mar 13 03:03:27 regDesktopHome kernel: [   99.254656] NVRM: API mismatch: the client has the version 331.49, but     Mar 13 03:03:27 regDesktopHome kernel: [   99.254656] NVRM: this kernel module has the version 304.88.  Please     Mar 13 03:03:27 regDesktopHome kernel: [   99.254656] NVRM: make sure that this kernel module and all NVIDIA driver     Mar 13 03:03:27 regDesktopHome kernel: [   99.254656] NVRM: components have the same version.     Mar 13 03:04:17 regDesktopHome kernel: [  149.314821] NVRM: API mismatch: the client has the version 331.49, but     Mar 13 03:04:17 regDesktopHome kernel: [  149.314821] NVRM: this kernel module has the version 304.88.  Please     Mar 13 03:04:17 regDesktopHome kernel: [  149.314821] NVRM: make sure that this kernel module and all NVIDIA driver     Mar 13 03:04:17 regDesktopHome kernel: [  149.314821] NVRM: components have the same version.      **edit 2** Okay, I did a `dpkg-reconfigure xserver-xorg`, then rebooted and now, I at least get a graphical login window but KDE never starts, entering my password just throws me ack to the login age... how can I proceed from here? I'm sure I'm entering the right password!


title: SMTP issues - unable to connect : CentOS 6.5, Postfix, Dovecot, MySQL

text: I'm trying to setup an email server on a CentOS system with Postfix, Dovecot and MySQL. I'm following this article for an Ubuntu system: https://library.linode.com/email/postfix/postfix2.9.6-dovecot2.0.19-mysql I can connect to the server using both secure pop/imap but can't with SMTP. I have tried sending an email from root and it remains in the queue. I get the following error:               connect to osiris.innovi.com[private/dovecot-lmtp]: No such file or directory      Here's the version that's installed on my system: MySQL v5.5.36 Postfix v2.6.6 Dovecot v2.0.9 The output of postconf is as follows:               alias_database = hash:/etc/aliases     alias_maps = hash:/etc/aliases     append_dot_mydomain = no     biff = no     config_directory = /etc/postfix     inet_interfaces = all     mailbox_size_limit = 0     mydestination = localhost     myhostname = osiris.innovi.com     mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128     myorigin = /etc/mailname     readme_directory = no     recipient_delimiter = +     smtpd_banner = $myhostname ESMTP $mail_name ($mail_version)     smtpd_recipient_restrictions = permit_sasl_authenticated permit_mynetworks     smtpd_sasl_auth_enable = yes     smtpd_sasl_path = private/auth     smtpd_sasl_type = dovecot     smtpd_tls_auth_only = yes     smtpd_tls_cert_file = /etc/pki/dovecot/certs/dovecot.pem     smtpd_tls_key_file = /etc/pki/dovecot/private/dovecot.pem     smtpd_use_tls = yes     virtual_alias_maps = mysql:/etc/postfix/mysql-virtual-alias-maps.cf     virtual_mailbox_domains = mysql:/etc/postfix/mysql-virtual-mailbox-domains.cf     virtual_mailbox_maps = mysql:/etc/postfix/mysql-virtual-mailbox-maps.cf     virtual_transport = lmtp:unix:private/dovecot-lmtp      Here's an output of the maillog when attempting to send emails:               Mar 13 10:21:58 osiris postfix/qmgr[905]: 1B57263655ED: from=<root@/etc/mailname>, size=488, nrcpt=1 (queue active)     Mar 13 10:21:58 osiris postfix/smtpd[2087]: fatal: parameter "smtpd_recipient_restrictions": specify at least one working instance of: check_relay_domains, reject_unauth_destination, reject, defer or defer_if_permit     Mar 13 10:21:58 osiris postfix/lmtp[2091]: 1B57263655ED: to=<sophal.lee@innovi.com>, relay=none, delay=2221, delays=2221/0.03/0/0, dsn=4.4.1, status=deferred (connect to osiris.innovi.com[private/dovecot-lmtp]: No such file or directory)     Mar 13 10:21:59 osiris postfix/master[897]: warning: process /usr/libexec/postfix/smtpd pid 2087 exit status 1     Mar 13 10:21:59 osiris postfix/master[897]: warning: /usr/libexec/postfix/smtpd: bad command startup -- throttling     Mar 13 10:22:25 osiris postfix/pickup[1554]: 5383763655F0: uid=0 from=<root>     Mar 13 10:22:25 osiris postfix/cleanup[2097]: 5383763655F0: message-id=<20140313142225.5383763655F0@osiris.innovi.com>     Mar 13 10:22:25 osiris postfix/qmgr[905]: 5383763655F0: from=<root@/etc/mailname>, size=488, nrcpt=1 (queue active)     Mar 13 10:22:25 osiris postfix/lmtp[2091]: 5383763655F0: to=<sophal.lee@innovi.com>, relay=none, delay=0.02, delays=0.02/0/0/0, dsn=4.4.1, status=deferred (connect to osiris.innovi.com[private/dovecot-lmtp]: No such file or directory)      Thanks.


title: Awesome WM buggy rc.lua

text: I'm new to awesome, and I'm having trouble configuring a theme from the following repository: here I just moved the themes to my awesome directory, so the tree looks like this:               ~/.config/awesome/     -- rc.lua     -- themes        -- anon        -- multicolor # these are the themes from github     # etc      The `rc.lua` is copied from one of the themes here are its contents:               --[[               Steamburn Awesome WM config 2.0           github.com/copycat-killer                 --]]          local awful = require("awful")     awful.util = require("awful.util")          --{{{ Main     theme = {}          home          = os.getenv("HOME")     config        = awful.util.getdir("config")     shared        = "/usr/share/awesome"     if not awful.util.file_readable(shared .. "/icons/awesome16.png") then         shared    = "/usr/share/local/awesome"     end     sharedicons   = shared .. "/icons"     sharedthemes  = shared .. "/themes"     themes        = config .. "/themes"     themename     = "/steamburn"     if not awful.util.file_readable(themes .. themename .. "/theme.lua") then            themes = sharedthemes     end     themedir      = themes .. themename          wallpaper1    = themedir .. "/wall.png"     wallpaper2    = themedir .. "/background.png"     wallpaper3    = sharedthemes .. "/zenburn/zenburn-background.png"     wallpaper4    = sharedthemes .. "/default/background.png"     wpscript      = home .. "/.wallpaper"          if awful.util.file_readable(wallpaper1) then       theme.wallpaper = wallpaper1     elseif awful.util.file_readable(wallpaper2) then       theme.wallpaper = wallpaper2     elseif awful.util.file_readable(wpscript) then       theme.wallpaper_cmd = { "sh " .. wpscript }     elseif awful.util.file_readable(wallpaper3) then       theme.wallpaper = wallpaper3     else       theme.wallpaper = wallpaper4     end     --}}}          theme.font                          = "Tamsyn 10.5"     theme.fg_normal                     = "#cdcdcd"     theme.fg_focus                      = "#d79d38"     theme.fg_urgent                     = "#CC9393"     theme.bg_normal                     = "#140c0b"     theme.bg_focus                      = "#140c0b"     theme.bg_urgent                     = "#2a1f1e"     theme.border_width                  = "1"     theme.border_normal                 = "#140c0f"     theme.border_focus                  = "#915543"     theme.border_marked                 = "#CC9393"     theme.taglist_fg_focus              = "#d47456"     theme.tasklist_bg_focus             = "#140c0b"     theme.tasklist_fg_focus             = "#d47456"     theme.menu_height                   = "16"     theme.menu_width                    = "140"          theme.layout_txt_tile               = "[t]"     theme.layout_txt_tileleft           = "[l]"     theme.layout_txt_tilebottom         = "[b]"     theme.layout_txt_tiletop            = "[tt]"     theme.layout_txt_fairv              = "[fv]"     theme.layout_txt_fairh              = "[fh]"     theme.layout_txt_spiral             = "[s]"     theme.layout_txt_dwindle            = "[d]"     theme.layout_txt_max                = "[m]"     theme.layout_txt_fullscreen         = "[F]"     theme.layout_txt_magnifier          = "[M]"     theme.layout_txt_floating           = "[|]"          theme.menu_submenu_icon             = themedir .. "/icons/submenu.png"     theme.taglist_squares_sel           = themedir .. "/icons/square_sel.png"     theme.taglist_squares_unsel         = themedir .. "/icons/square_unsel.png"          theme.tasklist_disable_icon         = true     theme.tasklist_floating             = ""     theme.tasklist_maximized_horizontal = ""     theme.tasklist_maximized_vertical   = ""          return theme      It is not working, it just displays the cursor on a black screen whit no background not taskbar and you can't open terminals or anything else. Also I copied the themes to `/usr/share/awesome/themes` but I don't think it is the problem. I'm on arch-linux my version of awesome is `3.5.2`. If some one has done this, please help.


title: How to update CentOS 6.5 to kernel 2.6.32-431?

text: I need to update my CentOS 6.5 kernel to `2.6.32-431`. Running `yum clean all && yum update` doesn't do it for me. How do I update? And what could be the issue?               [root@centos64 ~]# uname -r     2.6.32-358.18.1.el6.x86_64     [root@centos64 ~]# cat /etc/redhat-release     CentOS release 6.5 (Final)     [root@centos64 ~]# yum clean all && yum update     Loaded plugins: fastestmirror     Cleaning repos: base epel extras updates     Cleaning up Everything     Cleaning up list of fastest mirrors     Loaded plugins: fastestmirror     Determining fastest mirrors     epel/metalink                                                                                | 8.1 kB     00:00      * base: centosz3.centos.org      * epel: fedora.mirror.nexicom.net      * extras: mirror.linux.duke.edu      * updates: centosb5.centos.org     base                                                                                | 3.7 kB     00:00     base/primary_db                                                                                | 4.4 MB     00:00     epel                                                                                | 4.4 kB     00:00     epel/primary_db                                                                                | 6.1 MB     00:01     extras                                                                                | 3.4 kB     00:00     extras/primary_db                                                                                |  19 kB     00:00     updates                                                                                | 3.4 kB     00:00     updates/primary_db                                                                                | 2.6 MB     00:00     Setting up Update Process     No Packages marked for Update     [root@centos64 ~]# uname -r     2.6.32-358.18.1.el6.x86_64      I'm running a VM at http://cloudatcost.com/


title: speed up linux server

text: On my VPS, I have centOS 6.5 installed with 2 virtual cpu 2048 MB memory, 60 GB disk and 300 GB monthly data. Doing a speed test today resulted in 168.62 Mbit/s dload and 37.39 Mbit/s upload. Then my own speed at home computer is woeful at dload 1.76 Mbps and upload 0.31 Mbps So anyway I use openmeetings by apache on above vps which works ok here in Australia but the other day when I attempted having a meeting in the States the latency was so so bad that the other user screen was frozen with no sound. As soon as I switched to meet them on their installed gotomeetings everything was fine which made me realise either my vps is way too slow to run live streaming video and/or my system settings are not anywhere near optimum. Where to start making improvements or am I kidding myself with the speed of my virtual slice ever being enough to handle live multi user video streaming? As openmeetings is created by apache I am guessing it uses a lot from both apache and mysql to run- would that impact on speed? Openmeetings has own network test and resulted ![enter image description here](http://i.stack.imgur.com/fQw6M.png) What would be considered minimum upload speed necessary for multiple user video conferencing under 50 at one time in one hour duration and what change of settings in apache and mysql could optimise speed?


title: smbd crashes after logout or failed login attempt

text: I'm running smbd 3.6.7 on Arch. It works fine, except that it crashes when on failed login attempts and after logoff. Here is an example using the wrong password. `rpcclient` is run in one terminal, and `smbd` in the other. The `smbd` process ends when `rpcclient` sends the wrong password.               $ rpcclient -L localhost -Utim     Enter tim's password:      Cannot connect to server.  Error was NT_STATUS_LOGON_FAILURE     $      //               $ sudo smbd -i -d 2     smbd version 3.6.7 started.     Copyright Andrew Tridgell and the Samba Team 1992-2011     uid=0 gid=0 euid=0 egid=0     rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)     Registered MSG_REQ_POOL_USAGE     Registered MSG_REQ_DMALLOC_MARK and LOG_CHANGED     rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)     Processing section "[homes]"     Processing section "[media]"     Processing section "[karin-backup]"     added interface eth0 ip=fe80::226:2dff:fe78:ac61%eth0 bcast=fe80::ffff:ffff:ffff:ffff%eth0 netmask=ffff:ffff:ffff:ffff::     added interface eth0 ip=192.168.1.5 bcast=192.168.1.255 netmask=255.255.255.0     waiting for connections     check_ntlm_password:  Authentication for user [tim] -> [tim] FAILED with error NT_STATUS_WRONG_PASSWORD     $      Example with the right password:               $ rpcclient -L localhost -Utim     Enter tim's password:      rpcclient $> getusername     Account Name: tim, Authority Name: JANA     rpcclient $> quit     $       //               $ sudo smbd -i -d 2     smbd version 3.6.7 started.     ...     waiting for connections     check_ntlm_password:  authentication for user [tim] -> [tim] -> [tim] succeeded     $       It also crashes if I try to connect to a share from Windows (XP) with the wrong password. With the right password, I _can_ access the share. What could the problem be? Here is my smb.conf: http://pastebin.com/sGyu2XWh


title: How to make Lynx COLUMN width infinite?

text: -width=NUMBER               number of columns for formatting of dumps, default is 80.      **My question:** "-width=999999" is not so good.. "-width=0" isn't working. How can I give the "-width" an infinite number? UPDATE: I am just trying to download a txt file (that has longer lines) with:               lynx --dump foo.com/bar.txt


title: How to upgrade TurnKey Linux 12.1 to 13.0

text: I have a Turnkey Linux 12.1 installation that I would like to upgrade to Turnkey Linux 13.0. The upgrade should transition from Squeeze 6.0.8 to Wheezy 7.x. I want to upgrade the Wheezy to utilize a variety of more up-to-date packages. I ran the standard:               apt-get update     apt-get upgrade     apt-get dist-upgrade      But each command ends with:                0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.      I suspect I'm not accessing the repository with the distribution upgrade info. Could someone help me upgrade the Turnkey Linux distribution?


title: Is there any way to do a CentOS minimal install without LVM / ext4?

text: I'm trying to benchmark the disk throughput of a base CentOS install on my lab XenServer setup, and am installing from the CentOS 6.4 minimal CD. However, the install ISO boots into a text-mode anaconda setup, which only offers me the option to next through some rudimentary setup steps. From memory, I'm sure the full CD used to allow me to partition, choose mount points and filesystems, but is a massive ISO, with a lot of packages I will probably never use. This minimal one just offers "use the whole disk", "replace an existing linux" and "use free space" and then merrily goes off and creates an LVM volume group, root and data volumes, and formats both as ext4. Benefits of LVM appreciated and not withstanding, I just want plain old MSDOS- labelled primary ext3 partitions for `/boot` and `/` (and possibly one more for `/home`). Do I _have_ to use the full CD for something so simple?


title: Xinerama configuration on OpenSuse

text: Configuration:   * OpenSuse 12.3 installed from the Sage Live CD (http://www.sagecommons.org)   * Latest proprietary NVIDIA drivers    * Dual GTX580s   * Four displays (two per card)   * Displays in a 2x2 arrangement. Bottom two are on card 0, top 2 on card 1   * Gnome When I enable Xinerama (+ TwinView for each card), I get multiple copies of all of the standard menu items (activities, the log off/etc. menu, etc.) spread across the menu bar. Also, the usable area of the bottom two displays is reduced by about 50%. The menu is at the top of the screens, but the desktop background is squeezed into the middle 50-ish percent. I can't explain the 50%-ish issue, but it appears that whatever app is creating the menus is running multiple instances. Interestingly enough, there are 5-6 copies of everything, rather than 4 (one per display) that would seem more logical. Suggestions? If I disable Xinerama, then the problem disappears, but that's not a very usable configuration. Displays are configured using the `nvidia-settings` application. (On a side note, it appears that all changes are applied to an `xorg.conf` file rather than the files in `xorg.conf.d`.


title: Conky positioning?

text: I'm using conky in fluxbox on Arch, and don't like the position of conky on startup. It's pops up in the middle of the screen when I startup. Is there a way to set the position of conky on the screen at startup? I want it to stick to the top of the screen automatically.


title: Prefixing and appending blocks of text to a list of files

text: I'm trying to prefix and append blocks of text to a list of files. Here is where I am so far. The sticking point is the `sed -i "1i \$prefix" "$file" &&` line. `sed` won't substitute the value of `prefix` in. I tried to follow various threads about this on unix.sx and a couple of other places, but just got a headache. Can someone tell me how to fix this? If it is too complicated I'm Ok with using something else instead of `sed`. This is closely related to How do I append text to the beginning and end of multiple text files in Bash?, which is where I got the code below from. The difference is that the question does not cover expanding a variable, and also in my case the strings in question are multiline.               filelist=(foo.tex bar.tex)          prefix='\documentclass[12pt]{article}                                                                                \usepackage{myarticle}                                                                                %\xpretocmd{\opening}{\insertname}{}{}                                                                                \begin{document}                                                                                %\insertname                                                                                \begin{verbatim}'          suffix='\end{verbatim}                                                                                \end{document}'                                                                                for file in "${filelist[@]}"; do       sed -i "1i \$prefix" "$file" &&       echo "$suffix" >> "$file"     done


title: installing nvidia driver on archlinux and mining dogecoin

text: I have a GeForce GTX660 and I'm trying to install the latest nvidia driver to ultimately be able to mine dogecoins with these installation instructions It says to put my kernel version in my PKGBUILD and nvidia.install file. From uname -r I get 3.12.8-1-ARCH but it cant find /usr/lib/modules/extramodules-3.12.8-1-ARCH/version when I run makepkg -ci but extramodules-3.12-ARCH exists. So I just set it to 3.12-ARCH and installed the package. `cat /proc/driver/nvidia/version` gives me the output:               NVRM version: NVIDIA UNIX x86_64 Kernel Module  331.38  Wed Jan  8 19:32:30 PST 2014     GCC version:  gcc version 4.8.2 20131219 (prerelease) (GCC)      However running `nvidia-smi` gives me: `NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installed and running.` Running `cudaminer` gives me: `Unable to query CUDA driver version! Is an nVidia driver installed?` I also tried running it with the official nvidia-304xx driver but that didn' t work either... Also tried just removing nvidia drivers and installing the official nvidia package with the same result.


title: How do I know the name of a tmux session?

text: Recently, I started using `tmux`, I find it nice but still having issues to understand this application. One of the basic questions I have is: How do I know (command from cli) what is the name of the `tmux` session I'm logged to. If I'm logged to some `tmux` session it will tell me its name, but if I'm not logged to a `tmux` session it will print nothing or some sort of an error.


title: How to unmount a formerly chroot'd filesystem?

text: I'm using a rescue-live-system (similar to a live-cd) to fix some issues with my Debian server, like that:               # mkdir -p /mnt/rescue     # mount /dev/md2 /mnt/rescue     # mount --bind /dev /mnt/rescue/dev/     # mount --bind /proc /mnt/rescue/proc/     # mount --bind /sys /mnt/rescue/sys/      Now I can chroot to `/mnt/rescue` - but after I'm done, how to unmount the filesystem again?               umount: /mnt/rescue: target is busy.         (In some cases useful info about processes that use          the device is found by lsof(8) or fuser(1))      I guess it's because `dev`, `proc` and `sys` are bound to the mounted file system. But it's not possible to unmount them either...


title: FreeNAS wont ask for password after logging in once

text: I recently installed the newest FreeNAS and have made a media share out of it. My problem is I made a share password protected for a specific user. Once I log in the first time it NEVER asks for it again. How can I make it request a login/pass every time I try to access the folder? It also at times will just decide to ask for a login/pass and tell me what I gave it was wrong then later let me in with the same credentials. What could be the reason for that?


title: Mount exFAT file system as user without hardcoding

text: I've "solved" the following problem, but not in a desirable way. First, mounting exFAT file systems in Linux was truly as simple as this site says. The catch is, "as long as you are root." A user would like to plug in his exFAT file system anytime, but attempting to do so results in:               mount.exfat /dev/sdc1 /media/exfat-device     ERROR: failed to open `/dev/sdc1'      This works as root, but I was able to solve this so that a user can mount it by adding the following line to `fstab`:               /dev/sdc1 /media/exfat-device exfat-fuse defaults 0 0      However, this is not desirable because it hardcodes sdc1 which assumes (incorrectly) that everything detected as sdc1 will always be exFAT. As an example I connected another non-exFAT drive which gives me no problems, and it's identified as sdc. Then I connect my exFAT device, which becomes sdd, making the `fstab` addition worthless. What do I need to do, without giving the user any `sudo` privileges or elevated access whatsoever, so that any user can connect an exFAT device to that particular machine and read/write to it?


title: Simplest wget example Scientific Linux

text: I'm on Sci Linux and know nothing about commands. How can I use the `wget` command? Can someone provide a simple example where it actually downloads something? How do you specify where the download is saved?


title: How can I made a Debian ports like repo?

text: Is there a way to have only a debian folder and build the package (downloading and unpacking the sources) automatic? I've seen uscan but it scans for new packages, it doesn't allow to have a fixed download URL string. **Edit:** I want to have a folder for every package and inside only the debian folder and I don't know how to do for automatic download the sources and package it. Fedora has spectools, Arch downloads the tarball specified on PKGBUILD, so I want the same on Debian


title: /etc/paths in OS X and other Unices

text: Is `/etc/paths` read by **every shell** that I run in OS X? For example, if I use zsh, will it parse `/etc/path` to populate `$PATH`? What exactly is the sequence that OS X follows to populate `$PATH`? Does it do it differently than other Unices?


title: Same file with different content on every read

text: I have a problem with a filesystem here on a storage machine. We noticed, that many of the data that comes out of the systems seams to be corrupt, but only with minor problems like CRC errors with self-verifing installers or small picture errors in movies. While tracking down the problem, i endet up in a test with 3 files with about 900MB each. The ext4 filesystem is **mounted read-only** , but every time i do a md5sum on the files, the result differs:               $  ls -l     -rw-rw-r-- 1 samba samba 922789695 Jan  7 21:47 File1     -rw-rw-r-- 1 samba samba 939080225 Jan  7 21:54 File2     -rw-rw-r-- 1 samba samba 996515494 Jan 14 21:13 File3          $  md5sum *     9449c8e4fd2869a7969017db266451b0  File1     016b5c2e8b535ec922f5efb4ec9082bc  File2     5576aeb34575e07171fa835a79fec147  File3     $  echo 3 > /proc/sys/vm/drop_caches # (clear file cache of the kernel)     $  md5sum *     3f03edec64e22de384fd3d2cff0e3730  File1     32b53ee1dd3f5c9796322cabe4f8c0da  File2     35af5c433d0725ab0892d4517faeceea  File3     $  echo 3 > /proc/sys/vm/drop_caches     $  md5sum *     593d83e084387a8d5bd9b445032a5669  File1     4f8b76249b96a1a29bdd748167c41bda  File2     8b5bab8a153eb6e33dc3cd7d23362090  File3     $  echo 3 > /proc/sys/vm/drop_caches     $  md5sum *     d716d9c4acbd3ade450bab46903810d9  File1     68ede84d1396075ffe8a9228966cc148  File2     b8d75123b2d5b18c0d2827a448f53086  File3     $  echo 3 > /proc/sys/vm/drop_caches     $  md5sum *     c991bcca3bc2f39fdd143f8460935646  File1     73e6301b28c3b1b0bb95df52ea5794dd  File2     a202e88343d6e7bc4dce808b885ad013  File3      First I let e2fsck check the whole disk. It found a few problems, but it finds other errors on every new run. I think it got other reads each time same as md5sum and the problem is on another layer. The whole thing is inside a xen vm, but i don't think that detail matters. The architecture is like:               ext4      |     dm-crypt      | (xen blk between here)     md-raid5 (softraid)      |      +---+-----------------------------+          |                             |     mainboard sata         +---------pcie---------+          |                 |                      |       3 disks         sata controller(jbod)   sata controller(jbod)      (1 failed)            |                      |                         2 disks                2 disks      lspci output of the sata controllers:               00:12.0 SATA controller: Advanced Micro Devices [AMD] nee ATI SB600 Non-Raid-5 SATA     02:00.0 RAID bus controller: Silicon Image, Inc. SiI 3132 Serial ATA Raid II Controller (rev 01)     03:00.0 SATA controller: JMicron Technology Corp. JMB363 SATA/IDE Controller (rev 03)      While i was searching for the problem, one of the 7 disks failed and the raid is currently running with only 6 disks until the replacement arrives. Maybe this can be part of the problem? It existed definitly before the failure, but now the raid should be in a vulnerable but stable state...? Whats going on here?


title: Debian lenny 5 install php-dev

text: I'm trying to install apt-get install php5-dev but when I run the command               Reading package lists... Done     Building dependency tree     Reading state information... Done     Some packages could not be installed. This may mean that you have     requested an impossible situation or if you are using the unstable     distribution that some required packages have not yet been created     or been moved out of Incoming.     The following information may help to resolve the situation:          The following packages have unmet dependencies:       php5-dev: Depends: autoconf (>= 2.63) but 2.61-8 is to be installed                 Depends: libtool (>= 2.2) but it is not going to be installed     E: Broken packages      How can I solve this situation?


title: How to guarantee the integrity of an OS?

text: > In information security, integrity means that data cannot be modified > undetectably. This answer raised my interest, of course, I want to guarantee the integrity of my OS, outlined here. Suppose a security camera project where you store every photo to a folder. I used fswebcam -program, crontab and some bash scripts to automatically to shoot photos. I did it for second-hand store on very low budget, re-used old laptops and old cameras, and with limitations such as no internet connection. I am unsure whether the os, obsd, offers some extra features not in use which I could use, perhaps some sort of paranoia mode. Basically, each comp had clearly predefined schedule: take a photo (execute a script, ...), save it to a file, ... -- if anything different, alarm. I don't know whether there is any way to freeze the rest of the os in a way that it is totally unusable in other services. Some of the laptops could be shooters while one laptop could be a receiver or core data center.   * How can you do it with obsd laptops that can work in concert?   * How could you guarantee the integrity of the OS so that no picture cannot be removed or if removed it will leave traces?   * In which mode would you put a shooter and a receiver obsds? Are they in different modes and why? **Related but not the same**   1. favourite integrity monitoring software?   2. Verifying server software integrity?


title: How to install Linux Mint 17 on SSD and have Home on HDD

text: I have Sony Vaio VGN-NW23NE Laptop and I'm using Linux Mint as my Operating System for about two years, I've currently _Qiana_. I bought a new 120 GB SSD to speed up my Laptop, but I'm confused about how to use this SSD because there is so much information on internet. I want to have a fresh install of Linux Mint on SSD where I only want to install software and my Home on HDD where I can have Data like Documents, Movies etc. I have no partition on HDD and don't want any partition with new install.


title: Configure wget to not clobber good data with empty data

text: I currently have a setup where I have an emergency server which on a scheduled basis grabs files from my main webserver using wget. If all goes well I want wget to clobber the old cached file. However, if the request returns 404 or something else goes wrong where data cannot be retrieved (e.g. my main server goes down), I don't want the cached data to get clobbered. I've tried using -N which correctly clobbers the data if a new version is available. However, if there is a 404 it clobbers that data with 0 byte files.


title: Raid5 Device Has Less Space Than Expected

text: I have 3 3TB drives, and have raid5ed them together. I would expect to get a resulting device around 6TB. The command I used:               mdadm --create md0 --level=5 --raid-devices=3 /dev/sda1 /dev/sdb1 /dev/sdc1      Also of note:               # fdisk -l | grep 'Disk /dev/sd'     Disk /dev/md0 doesn't contain a valid partition table     Disk /dev/mapper/root doesn't contain a valid partition table     Disk /dev/mapper/swap_1 doesn't contain a valid partition table     Disk /dev/sda: 3000.6 GB, 3000592982016 bytes     Disk /dev/sdb: 3000.6 GB, 3000592982016 bytes     Disk /dev/sdc: 3000.6 GB, 3000592982016 bytes     Disk /dev/sdd: 320.1 GB, 320072933376 bytes     # mdadm --detail /dev/md0     md0:             Version : 1.2       Creation Time : Wed Jul 10 17:11:04 2013          Raid Level : raid5          Array Size : 4294702080 (4095.75 GiB 4397.77 GB)       Used Dev Size : 2147351040 (2047.87 GiB 2198.89 GB)        Raid Devices : 3       Total Devices : 3         Persistence : Superblock is persistent              Update Time : Thu Jul 11 14:51:17 2013               State : clean       Active Devices : 3     Working Devices : 3      Failed Devices : 0       Spare Devices : 0                   Layout : left-symmetric          Chunk Size : 512K                     Name : ...                UUID : 6331582a:92950387:4e4e7314:8bccf9cb              Events : 66195              Number   Major   Minor   RaidDevice State            0       8        1        0      active sync   /dev/sda1            1       8       17        1      active sync   /dev/sdb1            3       8       33        2      active sync   /dev/sdc1     #      Let me know if more information would be helpful.


title: NTP tool for showing deviance to a certain server

text: I am searching for a command-line that allows me to check the system time deviance to a NTP server specified on the command-line. I don't want to change/adapt the system time - only displays the deviance. Nice would be an text-mode display as it is used by the windows tool w32tm.exe:               14:09:06 d:+00.0331970s o:+00.0046684s [                           *                           ]     14:09:08 d:+00.0331985s o:+00.0050307s [                           *                           ]     14:09:10 d:+00.0331980s o:+00.0050342s [                           *                           ]     14:09:12 d:+00.0341736s o:+00.0041995s [                           *                           ]     14:09:14 d:+00.0341737s o:+00.0048171s [                           *                           ]     14:09:16 d:+00.0331742s o:+00.0043771s [                           *                           ]     14:09:18 d:+00.0341740s o:+00.0045760s [                           *                           ]      What program should I use?


title: Where can I find out how to write a shell script that is as portable as possible?

text: > **Possible Duplicate:**   >  Resources for portable shell programming I want to write a shell script that is intended for further distribution. So I'd like to write it in a way that is as portable as possible; by which I mean that it shouldn't rely on any fancy stuff that is only available in the particular flavour of `qzdfsh` that I happen to have installed on my own machine. The script will not be very complicated (the worst it will have to do is strip file extensions and test returns from programs). Where can I find out what stuff is supported in (almost) all shells? (I'm particularly aware of the fact that `/bin/sh` is often symlinked to "something else" so simply testing that it works with `/bin/sh` seems a dubious strategy.)


title: Why am I having problems installing Adobe Air on Linux Mint 14 and what is the solution?

text: I am attempting to install Adobe Air 2.6 on Linux Mint 14 in order to install an application that is dependent upon it. I was instructed to install the getlibs-all package which I did and was able to get slightly further in the installation process. However, I am now stuck scratching my head over the following error message:               Adobe AIR could not be installed.       Install either Gnome Keyring or KDE KWallet before installing Adobe AIR.      I already installed gnome-keyring through the Synaptic Package Manager, so I'm not sure why the installer is complaining. I have also installed python- keyring, kwalletmanager, and kwalletcli with no difference in outcome.


title: Is it possible that a method inside a module (in kernel mode) be preempted?

text: My basic question is about system stack of a thread, and system stack of a process Two methods in a module? Which of the methods can be preempted via kernel mode preemption, the one in process context or in thread context?


title: use awk to replace parentheses?

text: How can I use awk to replace the parentheses in these 2 scenarios?   1. Change empty parens to the word "None" 192.168.0.24,Up,()   2. Remove parens to only host.domain.com is left 192.168.0.25,Up,(host.domain.com)


title: What do mkfs.xfs and modprobe do when mounting an Amazon EBS instance?

text: I'm looking through this guide for how to add an EBS volume to an Amazon EC2 instance, and I've found this little part of instructions hard to follow: > Create an XFS file system on the EBS volume and mount it as /vol               grep -q xfs /proc/filesystems || sudo modprobe xfs     sudo mkfs.xfs /dev/sdh          echo "/dev/sdh /vol xfs noatime 0 0" | sudo tee -a /etc/fstab     sudo mkdir -m 000 /vol     sudo mount /vol      > You now have a 10 GB (or whatever size you specified) EBS volume mounted > under /vol with an XFS file system, and it will be automatically mounted if > the instance reboots. I don't believe I have `mkfs.xfs` installed, although `mkfs` is a valid command. This is a little too much piping and advanced syntax for me - I'm trying to figure out how to make this work on Ubuntu 10.04 and am not having any luck with it. Can someone tell me what is being attempted here so I can try and understand it and get it working for my Ubuntu EC2 Instance? **update** A few things I figured out:   * on my instance I had to use `/dev/xvdh` and not `/dev/sdh`   * still not sure what `grep -q xfs /proc/filesystems || sudo modprobe xfs` is doing as running each of those commands does not show any results.   * afaik the fstab is just to automatically connect the volume at boot


title: Why do some letters or escape sequences not render correctly in urxvt?

text: With a special combination of shell (zsh w/ syntax hightlighting), terminal (urxvt) and configuration with Xresources, I noticed a strange issue with font rendering that only seems to occur with some bold characters (AKA bold escape sequences) like the letter 'k' -- it will show up as a tall, empty vertical rectangle (see picture below): ![terminal shows strange font rendering](http://i.imgur.com/5UCZztY.png) Why does this happen?


title: Installing Fedora along side Ubuntu

text: I have installed Ubuntu 10.10 by specifying "Use the entire disk" during installation. Now, I would like to install Fedora alongside Ubuntu. I would like to know whether it's possible or not. If it's possible, then please explain the procedure to me. ![enter image description here](http://i.stack.imgur.com/ED5Nm.png) Can you tell me which option to choose and what should i do from here on.


title: Registering new mouse buttons with events in KDE

text: Is there a file or something where I can register the mouse events to do something? I'm using KDE. For example, in Windows, pressing Win + ArrowKeys nicely aligns the windows, I am looking for the file where I need to register this event. Also, how do I see the output of a KeyEvent?


title: How can I chroot into a live filesystem.squashfs Linux distribution?

text: I would like to **chroot** into a _Live USB_ Linux distro, if such thing is possible. I don't know if there is a generic method, so I will detail my specific test.   I am testing **Kali Linux v1.0.5 Live USB** created from Windows using _"Universal USB Installer"_.   This is the root of the pendrive:               23/12/2013  01:12 am    <DIR>          uui     05/09/2013  09:50 am    <DIR>          .disk     05/09/2013  09:51 am                25 autorun.inf     05/09/2013  09:47 am    <DIR>          dists     05/09/2013  09:46 am    <DIR>          firmware     05/09/2013  09:51 am           159.629 g2ldr     05/09/2013  09:51 am             8.192 g2ldr.mbr     05/09/2013  09:50 am    <DIR>          install     05/09/2013  09:51 am    <DIR>          isolinux     05/09/2013  09:49 am    <DIR>          live     05/09/2013  09:52 am            42.803 md5sum.txt     05/09/2013  09:47 am    <DIR>          pool     05/09/2013  09:51 am           366.350 setup.exe     05/09/2013  09:50 am    <DIR>          tools     05/09/2013  09:51 am               223 win32-loader.ini     11/01/2013  05:55 pm            49.070 Uni-USB-Installer-Copying.txt     24/11/2013  10:22 pm            18.233 Uni-USB-Installer-Readme.txt     04/04/2012  08:42 pm            18.092 license.txt     01/01/2014  09:23 pm    <DIR>          Instalac                    9 archivos        662.617 bytes                   10 dirs   1.486.944.256 bytes libres      ...and, as long as I suppose this is the important part:                Directorio de k:\live          23/12/2013  01:12 am    <DIR>          .     23/12/2013  01:12 am    <DIR>          ..     05/09/2013  09:46 am            60.319 filesystem.packages     05/09/2013  09:46 am               159 filesystem.packages-remove     05/09/2013  09:45 am     2.410.737.664 filesystem.squashfs     05/09/2013  09:46 am        17.296.271 initrd.img     05/09/2013  09:47 am           176.764 memtest     05/09/2013  09:46 am         2.250.960 vmlinuz                    6 archivos  2.430.522.137 bytes                    2 dirs   1.486.944.256 bytes libres      I think that the **filesystem.squashfs** file is the important part here, but I am not sure.   Thanks for any help.


title: Dual boot debian/Win XP - hidden partitions and primary partition limit

text: I decided it's (finally) time to make my eee a debian/WinXP dual boot. I have Windows already installed and chose to sacrifice most of an existing data partition for debian. Here's how the partitions look like in the debian installer:               SCSI2 (0,0,0) (sdb) - 2.0 GB TE USB         #1              2.0 GB      fat16     SCSI5 (0,0,0) (sdc) - 160.0 GB ATA ST9160314AS         #1 prmiary     77.4 GB  B   ntfs            pri/log     77.4 GB      FREE SPACE         #3 prmiary      5.2 GB      fat32         #4 primary     49.4 MB       From what I read the last two partitions are ASUS' hidden recovery partitions for reinstalling windows when the time comes. I have also read, that there's a general 4 primary partitions limit and I need at least 2 primary partitions (/ and swap) for my debian install. The limit is why (I believe), when I create one partition on the FREE SPACE, the rest of it is described as 'unusable' by the installer. What's the best thing to do now? I wouldn't want to lose the recovery partitions (they will come in handy eventually, creating your own USB bootable win image is a pain, and most of the firmware is useful) and I definately wouldn't like to give up mu first non-server debian use. Is there any workaround? Am I missing a point somewhere along the way? Plus, if I can be choosy I'd still like to have a small fat32 partition for swapping data between systems if necessary


title: Terminal not reporting resize properly

text: I'm having a problem where when I resize my terminal, it doesn't seem to be reported properly and so none of the applications in it don't display properly. For example: If I open a terminal, remote in to a server and open vim without resizing, vim will take up the entire screen as expected. If I then resize my terminal and open vim again (I'm using vim here as an example but it happens with any program or terminal output), it will still act as if the terminal is the original size. Is there a way to force my terminal emulator to report this change in size to the remote server? I'm connecting to AIX machines using Terminator 0.95 on RHEL 6.5, and the shell on the remote server is KSH, for reference. Thanks! Edit to answer the questions in the comment below: `echo $TERM` gives xterm (I'm assuming this is what the default is in terminator, as I haven't changed it). I am logging in using `rsh`


title: DVD drive constanly spins up/down when idle

text: DVD drive constantly spins up/down when idle on notebook. I cannot track what is causing it. The process of spinning up/down is quite noisy and disturbing. `lsof` cannot find anything that have device file opened or anything that keeps any file opened. It is some regression but I don't see any update that might have caused it. Drive is mount/unmount by usdisk. **EDIT:** To answer:   1. It is regression I need to pinpoint   2. There is no errors in dmesg   3. It happens when disk is mounted   4. It worked in past with pooling   5. The only recent chang was rebuild of udisks with patch named "Fix long hangs on probing nonexistant floppies."


title: ipfw : Traffic Shaping

text: I'm not sure what but it seems like I'm doing something wrong... my objective is to be able to limit some of my traffic, to be exact www traffic. One of my clients os running what's called a webproxy, where an end-user can surf any webpages through their site, if anyone interested take a look at: http://www.thespacesurf.com/ So here is my `/etc/ipfw.rules` file followed by `ipfw show` and `ipfw pipe show`:               flush     pipe flush     pipe 1 config bw 1Mbit/s mask src-port www     pipe 2 config bw 1Mbit/s mask src-port www     add 100 allow ip from any to any via lo0     add 200 deny ip from any to 127.0.0.0/8     add 300 deny ip from 127.0.0.0/8 to any     add 8381 pipe 1 tcp from any to any dst-port www uid daemon     add 8382 pipe 2 tcp from any to any src-port www uid daemon     add 8025 allow tcp from any to any dst-port smtp     add 8110 allow tcp from any to any dst-port pop3     add 8143 allow tcp from any to any dst-port imap     add 8993 allow tcp from any to any dst-port imaps     add 8995 allow tcp from any to any dst-port pop3s     add 65000 pass all from any to any          su-3.2# ipfw show     00100  85839853  23452504269 allow ip from any to any via lo0     00200         0            0 deny ip from any to 127.0.0.0/8     00300         0            0 deny ip from 127.0.0.0/8 to any     08025   8835622   3440233341 allow tcp from any to any dst-port 25     08110    748762     44303607 allow tcp from any to any dst-port 110     08143    443916     26822178 allow tcp from any to any dst-port 143     08381 139901701  10870804903 pipe 1 tcp from any to any dst-port 80 uid daemon     08382 181159216 209004032651 pipe 2 tcp from any 80 to any uid daemon     08993   2621221    332143828 allow tcp from any to any dst-port 993     08995    880748     87973919 allow tcp from any to any dst-port 995     65000 323132905 187469722830 allow ip from any to any     65535         0            0 deny ip from any to any     su-3.2# ipfw pipe show     00001:   1.000 Mbit/s    0 ms   50 sl. 1 queues (1 buckets) droptail         mask: 0x00 0x00000000/0x0000 -> 0x00000000/0x0000     BKT Prot ___Source IP/port____ ____Dest. IP/port____ Tot_pkt/bytes Pkt/Byte Drp       0 tcp     64.237.55.83/49910  66.218.161.133/80    139909114 10871439505  0    0  50     00002:   1.000 Mbit/s    0 ms   50 sl. 1 queues (1 buckets) droptail         mask: 0x00 0x00000000/0x0000 -> 0x00000000/0x0000     BKT Prot ___Source IP/port____ ____Dest. IP/port____ Tot_pkt/bytes Pkt/Byte Drp       0 tcp   66.218.161.133/80       64.237.55.83/49910 181159216 209004032651  0    0 21025730     su-3.2#       According to `mrtg` I'm doing way over the 1Mbit/s that I set in my `ipfw`. I'll be more than happy to provide whatever additional information is needed to solve this issue, but for starters:               su-3.2# uname -a     FreeBSD x.xxx.xxx 7.3-RELEASE FreeBSD 7.3-RELEASE #13: Tue Mar 23 20:47:52 UTC 2010     xxx@x.xxx.xxx:/usr/obj/usr/src/sys/GENERIC  amd64     su-3.2#


title: change prompt color depending on user or root in zsh

text: in zsh you can have a `%#` in your `PS1` (or whatever `PROMPT` variable) which basically means display `%` if user or display `#` if root. I'm wondering if there is any way to affect this so that the `%` or `#` changes colors depending on whether it's a user or root (a red for root, a blue for user ) the obvious way is just to change the `PS1` in my root's `~/.zshrc` but considering this is already a special symbol I'm wondering if there isn't perhaps a way I can use the same `PS1` for both... something specific to `%#` like it is for zsh ( I'm sure there are other hacks I could do too like an if then statement ).


title: vi mode doesn't display correctly on new term

text: This is a continuation of my previous questions. I currently have the following in `~/.zsh.d/functions.sh`               function zle-line-init zle-keymap-select {         psvar[1]="${${KEYMAP/vicmd/}/(main|viins)/-- INSERT --}"         zle reset-prompt     }     precmd() {         psvar[2]=()         vcs_info         [[ -n $vcs_info_msg_0_ ]] && psvar[2]="$vcs_info_msg_0_"     }      and relevant sections from my `~/.zshrc`               if [ -d ~/.zsh.d ]; then         for i in ~/.zsh.d/*; do             if [ -r $i ]; then                 source $i             fi         done         unset i     fi          zle -N zle-line-init     zle -N zle-keymap-select     autoload -Uz colors && colors     autoload -Uz vcs_info     zstyle ':vcs_info:*' enable git     zstyle ':vcs_info:*' formats '[%b]'     zstyle ':vcs_info:*' branchformats '[%b|%r]'     zstyle ':vcs_info:*' actionformats '[%b|%a]'          # 063 is a blue          # vimode implentation     psvar[1]='-- INSERT --'     local down=$terminfo[cud1]$terminfo[cuu1]$terminfo[sc]$terminfo[cud1]     local mode="%F{063}%1 %(1v.%1v.)%f"     local up=$terminfo[rc]     local vimode=$down$mode$up          # current working directory as blue     local cwd='%F{063}%1~%f'          # display git branch if git repo     local git='%(2v.%F{099}%2v%f.)'          # if root then red # else blue %     local prompt_char='%(!.%F{red}%#%f.%F{063}%#%f)'          PS1=$'%{$vimode%} $cwd $git $prompt_char '     RPS1='%m'     preexec () { print -rn -- $terminfo[el]; }      This works right, except that it doesn't display `\-- INSERT --` when the shell is first started, after that it works as expected. _Other improvement suggestions welcome._ **Update** I decided to work around the issue, though I still don't know why it works. For now I've set `psvar[1]` to `\-- INSERT --` out of the box, since I know it will be insert on start. This doesn't feel like a proper resolution though.


title: What does 'patch unexpectedly ends in middle of line' mean?

text: This is the output of my patch command:               Hunk #11 merged at 4184,4190.     Hunk #12 merged at 4444.     Hunk #13 merged at 4944.     Hunk #14 NOT MERGED at 5106-5116.     Hunk #15 merged at 5290.     Hunk #16 merged at 5448.     patch unexpectedly ends in middle of line     Hunk #17 merged at 5608,5611.      The command was               patch -d ~/SOME_DIR -p1 --merge --verbose -u      The patch was produced using git:               git --git-dir ~/SOME_DIR/.git diff -U8 bb1ee538982957b421a4c0e78f30428e73c9a072 HEAD -- malloc.c      What does `patch unexpectedly ends in middle of line` mean, and is it a problem? Is it referring to hunk 16 or 17? What can I look for in the patch file to figure out what's causing this?


title: X-based email for reading mail from cron jobs

text: Can anyone give a recommendation for a simple X-based equivalent of mail / mailx for reading the mail I get from cron jobs?


title: Find matches for the 5th columns in a pipe delim files

text: File 1:     Connect|20130320000023|UTC|PPP|test3@test3.co.uk|test1@test1.co.uk|0BCBE578|     File 2:     Connect|20130320000023|UTC|PPP|test1@test1.co.uk|test1@test1.co.uk|0BCBE578|     Connect|20130320000025|UTC|PPP|test2@test2.co.uk|test1@test1.co.uk|0BCBE578|     Connect|20130320000025|UTC|PPP|test3@test3.co.uk|test1@test1.co.uk|0BCBE578|      I need to find matching records in both File 1 and File 2 in column 5. So from the above I need to return in the output:               Connect|20130320000025|UTC|PPP|test3@test3.co.uk|test1@test1.co.uk|0BCBE578|      Many thanks,


title: ttyS1/uart1 initialised but not accessible through /dev/ttyS1

text: I'm not sure at which level I am having a problem. System is a LeopardBoard DM368 running TI's own SDK / LSP / BusyBox kernel, the core Linux kernel is 2.6.x so using serial_core.c driver model. By default the system has one UART enabled, UART0, mounted as `/dev/ttyS0` which is also used/invoked via the bootargs `console=ttyS0,115200n8 earlyprintk`. We want to enable UART1 as `/dev/ttyS1`, so have gone through the low-level board initialisation code which sets up the pinmux, clocks, etc. On booting, the low-level init reports (via printk's I added in) that it's enabled the UART1, and the driver code reports happiness too:               [    0.547812] serial8250.0: ttyS0 at MMIO 0x1c20000 (irq = 40) is a 16550A     [    0.569849] serial8250.0: ttyS1 at MMIO 0x1d06000 (irq = 41) is a 16550A      However, the port does not appear in `/dev/` (as `/dev/ttyS1`), and there are discrepancies with its status (flow control bits) which I suspect may be causing it to hang / never transmit:               cat /proc/tty/driver/serial     serinfo:1.0 driver revision:     0: uart:16550A mmio:0x01C20000 irq:40 tx:97998 rx:0 CTS|DSR     1: uart:16550A mmio:0x01D06000 irq:41 tx:0 rx:0 DSR      If I try to configure or modify it from the command line I get an error:               >: stty -F /dev/ttyS1     stty: can't open '/dev/ttyS1': No such file or directory      Bizarrely, if I change the bootargs to `console=ttyS1,115200n8 earlyprintk` the port works perfectly, and ttyS0 is still initialised correctly and works too:               cat /proc/tty/driver/serial     serinfo:1.0 driver revision:     0: uart:16550A mmio:0x01C20000 irq:40 tx:0 rx:0 CTS|DSR     1: uart:16550A mmio:0x01D06000 irq:41 tx:11563 rx:0 RTS|DTR|DSR      Now, that would be fine, but our bootloader must use UART0 so it would be nice to keep all the console stuff on ttyS0 and have ttyS1 for our secondary comms. I inserted a couple of printk's into serial_core.c and it seems like uart_open() is never being called for ttyS1, I'm assuming it's something in the Linux init/startup sequence that needs modifying? **Edited** : because I had fooled myself by doing an `echo >/dev/ttyS1` which had created a _file_ called `/dev/ttyS1`, which clouded matters somewhat. I'm now 99% sure `/dev/ttyS1` is _never_ created.


title: How to install the real Thunderbird on Debian wheezy?

text: I have Crunchbang 64 bit, a debian wheezy distro. Debian have a rebranded Firefox called Iceweasel and a rebranded Thunderbird called Icedove. But I don't want any of them. I was able to install the latest version of Firefox by adding Linux Mint repo, and installing it from there. I did the same and installed Thunderbird, but it tells me that I'm not using the latest version, I need to download it from their site. I downloaded it from the site and when i run `sudo sh run-mozilla.sh` I get `run-mozilla.sh: Cannot execute ` I tried different commands, none worked. Do I need to `chmod` it?


title: Processor usage increases with 4GB RAM installed

text: I have an Intel Atom D2700 (Synology NAS DS412+) with 4GB RAM running kernel 3.2.30 x86_64. This unit has a single DIMM slot. One thing I, and other's have found, is that when adding a 4GB DIMM versus a 2GB DIMM, the unit experiences significantly higher CPU usage when under load (for example, 'heavy' Java applications like Minecraft servers, or Plex transcoding, etc). Many users have found that when they drop back to 2GB all of these high load issues disappear. Is this something specific to Linux that may cause this? Or is this an issue with the Atom itself?


title: setting variables inside subshell when using <<

text: I am using the following method in order to pass commands into a subshell that is started by "newgrp".               #!/bin/csh     echo "Before newgrp"     /usr/bin/newgrp users <<EONG     echo "hello from within newgrp"     id     EONG     echo "After newgrp"      It works fine as long as I don't try and "set" anything in the subshell. i.e               #!/bin/csh     echo "Before newgrp"     /usr/bin/newgrp users <<EONG     echo "hello from within newgrp"     set a=npy     echo $a     id     EONG     echo "After newgrp"      As you can see above, I set a=npy inside the subshell and doing an echo $a should return npy. However, I get to see an error as a is not declared. Can someone tell me how I can set env vars inside a subshell while using `<<`


title: When using less with -S option, it moves text on top when I press right key

text: I am using less as pager in MySQL, and I have configured it with `-S` flag, so that it does not wrap text. The only issue is that, when I have a small result set and want to see what is on the right, I press right arrow key and suddenly my text pops up on the first line of terminal. I known that this isn't a big issue, but it is annoying. I looked in the manual page, but I could not find any option that would help me. Do you have any suggestion? Some other pager perhaps, that support `_no wrapping_` and does not suffer from the issue I described here?


title: KVM linux guest, 2nd HDD, LVM partition or whole disk

text: I've got a RAID 10 arrays on a couple of KVM host machines. The RAID 10 array is one big `VG`. I usually create a small `LV` for guest disk image storage then the rest of the `VG` I carve out as `LVs` to add additional disks to guests. Within these guests I usually run `fdisk` on the newly added device and create a single partition using 100% of the added drive, then run `pvcreate` on the partition rather than the device.   e.g. `pvcreate /dev/vdb1` vs `pvcreate /dev/vdb` I realise that `LVM` itself operates perfectly normally when creating a `PV` from full devices rather than partitions. But my habit has always been to partition first.   Can anyone see any downsides to using a non-partitioned drive in my particular scenario? Any further disks that I add to guests are going to either expand an already existing data logical volume, or to create an additional data partition. I usually leave root/boot alone and just add additional data storage under existing/new mount points. The advantage of using a non-partitioned drive within my guest is that I don't have to bother partitioning it with `fdisk` first. Though I realise this probably only saves about 1 minute of time. Does this have any effects on the potential recovery of data, e.g. being able to access the guest's logical volume from outside the guest in case of VM failure.   Or being able to attach the LVs carved out of the host as additional drives on new VMs in a rebuild scenario?


title: ld.so.preload doesn't differ x86_32 and x86_64

text: — It's known you can run x86_32 programms with x86_64 kernel if it was compiled with support for that. But dynamic linker doesn't provide any way to define a separate set of preload libraries for 32-bit programms, so every time you run such a program, had you x86_64 preloads, you would face this error message:               ERROR: ld.so: object '… … …' from /etc/ld.so.preload cannot be preloaded (wrong ELF class: ELFCLASS64): ignored.      In case you put there the same list of x86_32-libraries to pre-load, you would get it working, but all pure x86_64 runs would start complaining as well. The best possible way is to modify the dynamic loader to support pre-loading from separate files, obviously, but it's at least lengthy process. Can you think of some clean workaround?… For now I'm thinking about some `multi-class-pre-load.so`, which could load needed files by itself, but, as I can see, there's no "multi-class" support in ELF.


title: Related to buffer cache

text: I would like to know, how is the hit ratio related to priority of the process? Hit ratio=(Number of hits)/(Number of hits + Number of misses) Also I would like to know what are the factors which influence the Hit Ratio? Can anyone suggest where actually priority comes into picture when calculating hit ratio??


title: Related to Scheduling

text: I would like to know the ratio of high processes to low priority processes running at ant given time in real time? What factors does it depend on?


title: < and << in UNIX /Linux

text: What is the option `<<`and `<` are used in linux for??? For example               cat << abc.txt      I know its a stupid question, but i was not able to search it on google as i did not know what `keyword` to search for or what is it, and every-time i tried searching it showed up wrong results!! Same goes in tagging the tags for this question, don't know what key-word defines it!!!


title: Copy command from history to bash prompt

text: Sometimes I'd like to get some command from `history` output, copy it to bash prompt, make some changes and run it. Is there a way to copy command from a `history` output to bash prompt without involving mouse? For example, it would be some script, than I can bind shortcut to. _**EDIT:_** Maybe I do not understand `fc` enough, but it looks like I cannot select folder or file via `fc` (like `Tab` for usual comand prompt)


title: tty blinking cursor not at insertion point

text: I have an Ubuntu 12.04 system where I, at reboot, login a root. This morning I did the things I had to and thought about running               apt-get -y upgrade      I started typing this but before pressing `Enter` I looked at the screen to check for mistyping things, and did see the cursor (blinking underscore) a few spaces after the final `e` like this (without the actual blinking):               apt-get -y upgrade    _      I definately did not type any spaces after the final `e`. After that I did just press `Enter` and `apt-get` ran fine. I have often seen this happen before and would like to know what might cause this, in order to prevent it from happening again. Alternatively some way to reset this would also be acceptable. Some details:   * I tried `stty sane`, that did not change anything.   * Before the `apt-get` command I did run a `mount` and `w`. The change happened between starting to type `apt...` and the final `e`   * This was on tty2. When I logged out the cursor at the `login:` prompt was not at the position, but a few positions off on as well.   * Switching to tty1, where I was not logged in, showed the cursor at the wrong position as well.   * I switched back to the GUI (`Alt`+`F7`) and back to tty2 and the cursor was still off.    * After looking at tty2 a minute or two later (while writing this Q and wanting to check something) the `login:` prompt was still there **but now the cursor was at the right position**.   * I tried to recreate the problem by issuing the same commands (but with different amounts of time between them as before, now directly after each other) and could **not** get the cursor to bulge from the normal position.   * `echo $TERM` gives `linux`   * `echo $PS1` gives `${debian_chroot:+($debian_chroot)}\u@\h:\w\$` This would not bother me so much, but it has happened quite often. When just typing commands it is not such a problem, but it completely confuses me, when it happened and I want to edit some previous command (bash), as then the insertion point is a few positions left from the blinking cursor. How can I reset the cursor to the right position when this happens? Or preferably: how to prevent this from happening?


title: Setting max coredump size on AIX doesn't work

text: I googled to set the coredump max size on AIX to 20 MBytes:               0:root@SERVER:/root # su - username     $ ulimit -a     time(seconds)        unlimited     file(blocks)         unlimited     data(kbytes)         131072     stack(kbytes)        32768     memory(kbytes)       32768     coredump(blocks)     2097151     nofiles(descriptors) 2000     threads(per process) unlimited     processes(per user)  unlimited     $ exit     0:root@SERVER:/root # chuser core=40960 username     0:root@SERVER:/root # su - username                  $ ulimit -a     time(seconds)        unlimited     file(blocks)         unlimited     data(kbytes)         131072     stack(kbytes)        32768     memory(kbytes)       32768     coredump(blocks)     40960     nofiles(descriptors) 2000     threads(per process) unlimited     processes(per user)  unlimited     $ exit     0:root@SERVER:/root #       but later a coredump, sized about ~800 MByte was created by this user. **My question** : Why? Is the 40960=20MB? -> 1=0,5 KByte? Or could was that the problem that the user probably didn't logged out/in after the max coredump size change?


title: Have xargs use alias instead of binary

text: Bash 4.2 on CentOS 6.5: In my `~/.bash_profile` I have a bunch of aliases, including:               alias grep='grep -n --color=always'      so that I can get color highlighting and print line numbers automatically when running `grep`. If I run the following, highlighting works as expected:               $ grep -Re 'regex_here' *.py      However, when I ran this recently:               $ find . -name '*.py' | xargs grep -E 'regex_here'      the results were not highlighted and line numbers weren't printed, forcing me to go back and explicitly add `-n --color=always` to the `grep` command.   * Does `xargs` not read aliases in the environment?   * If not, is there a way to make it do that?


title: Use of quotes in GNU grep regular expressions

text: I could see that certain patterns in the GNU Grep can be enclosed within brackets and certain others need not be. For example, matching the beginning of a word works only if it is enclosed within quotes.               user@host:~/Desktop$ grep -E '\<H' test     Hello World     user@host:~/Desktop$ grep -E \<H test      [test contains the string Hello World] But matching end and beginning of file works without dollar:               user@host:~/Desktop$ egrep d$ test     Hello World      Why is it so? And what is the rule?


title: Should LVM partitions be used in virtual machine images?

text: Should LVM be used for the partitions when creating VM images (e.g., KVM images)? It seems like it adds complexity if you want to, say, mount a qcow2 image in the host if the image has LVM partitions. On the other hand, it doesn't seem like the advantages of LVM partitions are as significant on a VM image, since it's much easier to take a VM offline and resize partitions than it is for a physical system.


title: How can I select all copy from vim and paste to other program e.g. mail client?

text: How can I do the following? Copy all text from vim and paste it to an external program e.g. mail Outlook? I tried `+y` and `gg*yG` but the paste does not work.


title: Measuring transfer speed of USB drive

text: I want to write a program to find out the average data transfer speed of my USB port. How do I go about implementing it? The only method I can think of is writing a large file to the path where the USB drive is mounted and finding out the time for that process. Is there a better method than this?


title: Can one make a bootable device with several distros of Linux?

text: I think this question explains itself. But here are some more details anyway: Many Linux distributions have "live USB's" which one can use to try and install that distro. However, that pen must often be formatted, and even afterwords, it can only have the purpose to install that one distribuition. Why can't one have a directory for each distro and have BIOS boot from that? (maybe including some file leading to other the files from which to boot, but not having them all laying in the top directory of that drive) How? Which distribuitions support that? Can you make such a file for BIOS to detect and find the bootable files for several distros? (then one should choose from which one to boot from, like when a computer has several operating systems)


title: How to recover broken/partially deleted git repository

text: I accidently ran an `rm -r` on my .git directory. Luckly `rm` stopped when it got to a write-protected file, but I've still lost several things in my .git. **Files I still have:**               FETCH_HEAD     ORIG_HEAD     config     gitk.cache     logs/     objects/      **Files I've lost:**               HEAD     description     hooks/     index     info/     packed-refs     refs/      From what I can tell, the only things I've lost that I can't re-clone are the changes in my staging area and my refs. I'm prepared to lose my staging changes but I really need to recover my HEAD and my branches. Is there a way to do this? Say, by finding commits that have no children, checking them out to see what they are and creating branches for them? At the moment git doesn't even recognise my repository as a repository anymore though.


title: How do I deal with a certificate based transparent proxy in Arch Linux?

text: I have setup an Arch Linux VM at work, and my company uses a transparent (cut- through) proxy with a self-signed certificate and requires authentication. Whenever I try to install any packages through `pacman` I get the following error (e.g. trying to install `lynx`) > error: failed retrieving file 'lynx-2.8.7-6-x86_64.pkg.tar.xz' from > mirrors.kernel.org : SSL certificate problem: self signed certificate in > certificate chain It will throw this error for every mirror I have defined in `/etc/pacman.d/mirrorlist`. I have similar problems trying to use any other HTTP/S clients such as `curl`, but I do not have any issues with FTP (primarily because my company only monitors ports 80 and 443). What I've tried already...   * Placing my companies self signed CA certificate in `/usr/share/ca-certificates`, and `/etc/ca-certificates`   * Setting `http_proxy` and `https_proxy` to point to my company's proxy server with my credentials   * Talked to the person who manages our proxy server, but he doesn't know anything about Linux, so doesn't have a clue where to begin.  For now, when I need to install something or access the Internet, I'm opening an SSH tunnel to my home server to get around this. Below is the output of `openssl s_client -CApath /etc/ca-certificates -showcerts -connect mirrors.kernel.org:443`               CONNECTED(00000003)     depth=0 C = US, ST = California, L = San Jose, O = The Linux Kernel Organization, CN = *.kernel.org     verify error:num=20:unable to get local issuer certificate     verify return:1     depth=0 C = US, ST = California, L = San Jose, O = The Linux Kernel Organization, CN = *.kernel.org     verify error:num=27:certificate not trusted     verify return:1     depth=0 C = US, ST = California, L = San Jose, O = The Linux Kernel Organization, CN = *.kernel.org     verify error:num=21:unable to verify the first certificate     verify return:1     ---     Certificate chain      0 s:/C=US/ST=California/L=San Jose/O=The Linux Kernel Organization/CN=*.kernel.org        i:/C=US/ST=MyCompanyState/L=MyCompanyCity/O=MyCompanyName/OU=IT/CN=MyCompanyProxyServer/emailAddress=Admin@MyCompany.com     -----BEGIN CERTIFICATE-----     ... blah blah blah     -----END CERTIFICATE-----     ---     Server certificate     subject=/C=US/ST=California/L=San Jose/O=The Linux Kernel Organization/CN=*.kernel.org     issuer=/C=US/ST=MyCompanyState/L=MyCompanyCity/O=MyCompanyName/OU=IT/CN=MyCompanyProxyServer/emailAddress=Admin@MyCompany.com     ---     No client certificate CA names sent     ---      _**Note** I could probably try to simply use FTP mirrors instead, but that doesn't really solve the problem for other HTTP/S applications (e.g. `curl`)._


title: What is the udev rule to allow specific thumb drive vendors?

text: How can I write a udev rule that whitelists specific vendors and doesn't allow other USB drives? Do I put it in `/etc/udev/rules.d`, or `/lib/udev/rules.d`? What command do I run to test if the rule is working?


title: du -- ignore file not found errors

text: I'm trying to get the size of a folder an application is currently writing to. If I run the `du` command it sometimes fails with the error:               du: cannot access `/a/b/a.txt': No such file or directory      because the application deleted the file while `du` was processing. How can I tell it to ignore such errors?