tmux blocks certain things on my Mac

I really like `tmux` and use it often so I set the following in my `.zprofile`:               [[ $TERM != "screen" ]] && exec tmux      so when I open a new window, `tmux` will be there for me. However, there are some strange things that happen when `tmux` is running:   * `gnuplot`, `octave` and other programs that need to launch X11 to draw graphs can't seem to do so (or it takes _really_ long - 10 minutes or so). When X11 is already running, they don't have this problem though.   * Some scripts I write use `osascript` to alert me with a notification when something happens:              osascript -e 'display notification "some text" with title "Foo"'      this works fine when `tmux` is not active, but fails to do anything when called from within a `tmux` session. (note that other `osascript` actions _do_ work) Does anyone have an idea why this might be and what might be done to fix this? **Note:** I've posted a similar question about the first problem on the apple.se site some time ago but got no answer. The second problem only sprung up recently so I thought I'd try my luck here.


Mint keyboard mappings ignored

I turned off my computer for the first time in a while last night, and this morning the keyboard isn't behaving. The Dvorak layout is still ok, but the caps lock isn't acting as a backspace, even though when I go through Menu > Keyboard Layout > Options that option is selected. Also, I have a custom shortcut set up for the Home folder (ctrl-menu) which shows up in the Shortcuts menu but doesn't work anymore.


Xmonad.hs adding scratchpad, Not in scope error

Hey there im having some troubles adding scratchpads to my xmonad config. When im trying to compile the xmonad.hs file i get this: > Error detected while loading xmonad configuration > > xmonad.hs:172:34 Not in scope ´m' > > Please check file for errors. My knowledge in haskell is very limited, and im aware that this might be a basic error but im afraid im not able to solve it. This is the xmonad.hs config:               --     -- Imports needed for config     --     import System.IO     import System.Exit     import XMonad     import XMonad.Actions.FindEmptyWorkspace     import XMonad.Actions.TagWindows     import XMonad.Actions.OnScreen (greedyViewOnScreen, viewOnScreen)     import XMonad.Actions.Warp     import XMonad.Hooks.DynamicLog     import XMonad.Hooks.ManageDocks     import XMonad.Hooks.ManageHelpers     import XMonad.Hooks.SetWMName     import XMonad.Hooks.EwmhDesktops     import XMonad.Hooks.ICCCMFocus     import XMonad.Hooks.UrgencyHook     import XMonad.Hooks.ManageHelpers (isFullscreen, doFullFloat)     import XMonad.Layout.Fullscreen     import XMonad.Layout.NoBorders     import XMonad.Layout.Spiral     import XMonad.Layout.Tabbed     import XMonad.Layout.ThreeColumns     import XMonad.Layout.Combo     import XMonad.Layout.Grid     import XMonad.Layout.LayoutModifier     import XMonad.Layout.Named     import XMonad.Layout.PerWorkspace     import XMonad.Layout.Reflect     import XMonad.Layout.TwoPane     import XMonad.Layout.WindowNavigation     import XMonad.Layout.IndependentScreens     import XMonad.Util.WindowProperties     import XMonad.Util.Run(spawnPipe)     import XMonad.Util.EZConfig(additionalKeys)     import XMonad.Util.Run     import XMonad.Util.Dmenu     import XMonad.Util.Scratchpad     import XMonad.Prompt     import qualified XMonad.StackSet as W     import qualified Data.Map        as M     import qualified XMonad.StackSet as S     import XMonad.Config.Gnome     import Control.Monad     import Data.Ratio     import Data.Maybe (fromMaybe)          ----------------------     -- Define variables --     ----------------------     myTerminal = "gnome-terminal"     myBrowser = "x-www-browser"     runMenu = spawn "dmenu_run"               -----------------------     -- Define Workspaces --     -----------------------     myWorkspaces = ["1:term","2:web","3:code","4:subl","5:media","6:vm"] ++ map show [7..9]          --     -- Define windows     -- Use 'xprop | grep WM_CLASS' to find the WM_NAME you want to move.     --          myManageHook = composeAll         [ className =? "x-www-browser"  --> doShift "2:web"         , className =? "Google-chrome"  --> doShift "2:web"         , className =? "Sublime_text"   --> doShift "4:subl"         , className =? "Eclipse"        --> doShift "3:code"         , className =? "Java"       --> doShift "3:code"         , className =? "spotify.exe"    --> doShift "5:media"         , className =? "Wine"           --> doShift "5:media"         , className =? "VirtualBox"     --> doShift "6:vm"         , resource  =? "desktop_window" --> doIgnore         , resource  =? "gpicview"       --> doFloat         , className =? "MPlayer"        --> doFloat         , className =? "stalonetray"    --> doIgnore         , isFullscreen --> (doF W.focusDown <+> doFullFloat)] <+> manageScratchPad          manageScratchPad :: ManageHook     manageScratchPad = scratchpadManageHook (W.RationalRect l t w h)            where              h = 0.1     -- terminal height, 10%         w = 1       -- terminal width, 100%         t = 1 - h   -- distance from top edge, 90%         l = 1 - w   -- distance from left edge, 0%               ------------------------     -- Layout definitions --     ------------------------          -- The layouts which xmonad switches between     myLayout = avoidStruts (         Tall 1 (3/100) (1/2) |||         Mirror (Tall 1 (3/100) (1/2)) |||         tabbed shrinkText tabConfig |||         Full |||         spiral (6/7)) |||         noBorders (fullscreenFull Full)               ---------------------------------     -- Color and design properties --     ---------------------------------               -- Define the colors and borders of windows in xmonad          myNormalBorderColor  = "#7c7c7c"     myFocusedBorderColor = "#ffb6b0"          -- Colors for text and backgrounds of each tab when in "Tabbed" layout.          tabConfig = defaultTheme {         activeBorderColor = "#7C7C7C",         activeTextColor = "green",         activeColor = "#000000",         inactiveBorderColor = "#7C7C7C",         inactiveTextColor = "#EEEEEE",         inactiveColor = "#000000"     }          -- Color of current window title in xmobar.     xmobarTitleColor = "#FFB6B0"          -- Color of current workspace in xmobar.     xmobarCurrentWorkspaceColor = "green"          -- Width of the window border in pixels.     myBorderWidth = 1                    ------------------     -- Key bindings --     ------------------          -- Setting windows button as primary action (mod)     myModMask = mod4Mask     -- Alt as secondary action.     altMask   = mod1Mask          -- Key binds     myKeys conf = M.fromList $         [ ((myModMask              , xK_Return    ), spawn myTerminal)         , ((myModMask              , xK_x         ), spawn myBrowser)         , ((myModMask              , xK_r         ), runMenu)         , ((myModMask              , xK_c         ), kill)         -- Empty Workspace Movement         , ((altMask                , xK_space     ), viewEmptyWorkspace)         , ((altMask .|. shiftMask  , xK_space     ), tagToEmptyWorkspace)         -- Layout Commands         , ((myModMask              , xK_space     ), sendMessage NextLayout)         , ((altMask .|. shiftMask  , xK_Return    ), sendMessage FirstLayout)         , ((myModMask              , xK_n         ), refresh)         , ((myModMask              , xK_m         ), windows S.swapMaster)         -- controlling window movement, position and location              , ((myModMask              , m            ), scratchpadSpawnActionTerminal myTerminal) // ERROR ON THIS LINE         , ((altMask                , xK_Tab       ), windows S.focusDown)         , ((altMask .|. shiftMask  , xK_Tab       ), windows S.focusUp)         , ((myModMask              , xK_Tab       ), windows S.focusDown)         , ((myModMask .|. shiftMask, xK_Tab       ), windows S.focusUp)         , ((myModMask              , xK_Down      ), windows S.swapDown)         , ((myModMask              , xK_Up        ), windows S.swapUp)         , ((myModMask              , xK_Left      ), sendMessage Shrink)         , ((myModMask              , xK_Right     ), sendMessage Expand)         , ((myModMask              , xK_t         ), withFocused $ windows . S.sink)         , ((myModMask              , xK_w         ), sendMessage (IncMasterN 1))         , ((myModMask              , xK_v         ), sendMessage (IncMasterN (-1)))         -- Shutdown commands         , ((myModMask              , xK_q         ), restart "xmonad" True)         , ((myModMask              , xK_h         ), spawn "gksudo pm-hibernate")         , ((myModMask .|. shiftMask, xK_q         ), io (exitWith ExitSuccess))         , ((myModMask .|. shiftMask, xK_w         ), spawn "gnome-screensaver-command -l")         -- Print Screen         , ((myModMask              , xK_Print     ), spawn "gnome-screenshot")         , ((altMask                , xK_Print     ), spawn "gnome-screenshot -a")         -- MPC and Volume commands         , ((myModMask               , xK_Page_Up  ), spawn "mpc next")         , ((myModMask               , xK_Page_Down), spawn "mpc prev")         , ((myModMask               , xK_Pause    ), spawn "mpc toggle")         , ((myModMask               , xK_F12      ), spawn "amixer -q set Master 5%+")         , ((myModMask               , xK_F11      ), spawn "amixer -q set Master 5%-")         , ((myModMask               , xK_F10      ), spawn "amixer -D pulse set Master 1+ toggle")         , ((0                       , 0x1008ff12  ), spawn "amixer -D pulse set Master 1+ toggle")         , ((0                       , 0x1008ff11  ), spawn "amixer -q set Master 5%-")         , ((0                       , 0x1008ff13  ), spawn "amixer -q set Master 5%+")              ] ++            -- mod-[1..9], Switch to workspace N       -- mod-shift-[1..9], Move client to workspace N       [((m .|. myModMask, k), windows $ f i)           | (i, k) <- zip (XMonad.workspaces conf) [xK_1 .. xK_9]           , (f, m) <- [(W.greedyView, 0), (W.shift, shiftMask)]]           --------------------     -- Mouse bindings --     --------------------          -- Focus rules     myFocusFollowsMouse :: Bool     myFocusFollowsMouse = True               -- Movements of windows, user mod + t to reset tile.     myMouseBindings (XConfig {XMonad.modMask = modMask}) = M.fromList $       [         -- mod-button1, Set the window to floating mode and move by dragging         ((modMask, button1),          (\w -> focus w >> mouseMoveWindow w))              -- mod-button2, Raise the window to the top of the stack         , ((modMask, button2),            (\w -> focus w >> windows W.swapMaster))              -- mod-button3, Set the window to floating mode and resize by dragging         , ((modMask, button3),            (\w -> focus w >> mouseResizeWindow w))       ]          ------------------     -- Startup hook --     ------------------     myStartupHook = return ()               ----------------     -- Run xmonad --     ----------------     main = do       xmproc <- spawnPipe "xmobar ~/.xmonad/xmobar.hs"       xmonad $ defaults {           logHook = dynamicLogWithPP $ xmobarPP {                 ppOutput = hPutStrLn xmproc               , ppTitle = xmobarColor xmobarTitleColor "" . shorten 100               , ppCurrent = xmobarColor xmobarCurrentWorkspaceColor ""               , ppSep = " | "           }           , manageHook = manageDocks <+> myManageHook           , startupHook = setWMName "LG3D"       }               ------------------     -- Merge it all --     ------------------     defaults = defaultConfig {         -- simple stuff         terminal           = myTerminal,         focusFollowsMouse  = myFocusFollowsMouse,         borderWidth        = myBorderWidth,         modMask            = myModMask,         workspaces         = myWorkspaces,         normalBorderColor  = myNormalBorderColor,         focusedBorderColor = myFocusedBorderColor,              -- key bindings         keys               = myKeys,         mouseBindings      = myMouseBindings,              -- hooks, layouts         layoutHook         = smartBorders $ myLayout,         manageHook         = myManageHook,         startupHook        = myStartupHook       }      Any hind on what the error is? This line is marked in the file.


How can I round all numbers in a file?

How can I round all numbers in a file that countains several columns of numbers up to a certain precision? Can this be done with awk? A single line looks like this:               text - 0.1655456615 - 0.158645 - 0.846554 - 0.85251 ##      EDIT: '-' is a column delimiter.


Install Ubuntu's font in other OSes?

Ubuntu has its own font for its UI in the past couple of releases. Is there a way to get this font in other GNU/Linux distros? Does the font come in its own file?


How do I set up of IBM Cognos Business Intelligence with an Apache web server?

I'm trying to put together an Apache configuration for quickly getting IBM Cognos Business Intelligence Server up and running. But I got no idea of how to do it, could someone help me?


/proc/PID/fd/X link number

In Linux, in `/proc/PID/fd/X`, the links for file descriptors that are pipes or sockets have a number, like:               l-wx------ 1 user user 64 Mar 24 00:05 1 -> pipe:[6839]     l-wx------ 1 user user 64 Mar 24 00:05 2 -> pipe:[6839]     lrwx------ 1 user user 64 Mar 24 00:05 3 -> socket:[3142925]     lrwx------ 1 user user 64 Mar 24 00:05 4 -> socket:[3142926]     lr-x------ 1 user user 64 Mar 24 00:05 5 -> pipe:[3142927]     l-wx------ 1 user user 64 Mar 24 00:05 6 -> pipe:[3142927]     lrwx------ 1 user user 64 Mar 24 00:05 7 -> socket:[3142930]     lrwx------ 1 user user 64 Mar 24 00:05 8 -> socket:[3142932]     lr-x------ 1 user user 64 Mar 24 00:05 9 -> pipe:[9837788]      Like on the first line: 6839. What is that number representing?


Where can I find the source code for `uptime`?

I am learning Python. Till now I've been doing only basic Python coding. A day ago, I checked python implementation of `tree` command. Suddenly I thought of creating a Python clone for `uptime`. I don't have any clue about which language it is implemented in and what would be the complexity involved in cloning it. But I couldn't find its source code. I am using Fedora 14. kernel-devel package is installed. I did `whereis uptime` but the resulting `/usr/bin/uptime` file shows weird symbols when opened using vim. Googling for its source code couldn't yield desired results either. Where can I find its source code?


Is there a tool that lets me share internet connection through Wifi?

I really like OS X's ability to share the internet connection through everything within several mouse clicks, but it seems that the Mac is doing something funny that prevents Linux machines from connecting. Is there a Linux software that lets me do the same thing, or at least to a certain degree? For those who don't know, from Mac's internet sharing settings, you choose the interface with the connection that should be shared (in), then choose the interface(s) that should be used to share (out). The machine will then make the changes and make the connection available through the out interface(s). You can also choose a password for WEP wireless encryption. Needless to say, when done you can stop sharing. Today I come across a script that shares the connection through Wifi, but as such it won't be easy to enable and disable sharing, let alone changing the options. I know it's unlikely to get something as full-featured as I described for free, so please fire off all your suggestions.


How can I specify OS-conditional build requirements in an RPM spec file?

I am trying to work my way around with the BuildPrereq flag in the spec files. I want a few pre-requisites to be included if the OS is of a particular version. something like               if os == fedora 4      BuildPrereq >= apr0.9     endif          if os == feodra 10      BuildPrereq >= apr2.0     endif       Is there any way to achieve the above ? Also I would like to hear some alternatives on this. The problem being i have a section of the code which is not required to be compiled on a few versions of OS. So i am looking at mixing conditional compilation and the above. Cheers!


Ossim Server email alert

ON ossim server , i want to get an email alert when someone has an rdp session on my network. How can i get an email alert from ossim for an RDP session from ossec and not from snort ?


Which file compression software for linux offers the highest size reduction?

I do a ton of file compression. Most of the stuff I am compressing is just code, so I need to use loss less compression. I was wondering if there was anything that offers a better size reduction then 7zip. It doesn't matter how long it takes to compress, or decompress, size is all that matters. Does anyone know of a software like this in Linux? Or is 7zip the best?


Perl Script Explanation

#!/usr/bin/perl -w     use strict;          my $args;     $args=@ARGV;          if ($args<1)     {         die("Expecting a filename");     }     sub showstat     {              print " $_[0] dev, device number of filesystem\n";           print " $_[1] ino,      inode number\n";           print " $_[2] mode,     file mode  (type and permissions)\n";           print " $_[3] nlink,    number of (hard) links to the file\n";     }          my $filename=$ARGV[0];     if (open (TESTFILE,$filename))     {         my @filedata= stat(TESTFILE);              &showstat(@filedata);         close (TESTFILE);     }     else     {         print "error on open $filename";          }      My question is if we set a variable (`$args`) for the array (`@ARGV`), when we print the line under the sub showstat, shouldn't it be `print"$args[0] ..." print "$args[1]"`? And for `$filename=$ARGV[0]`, shouldn't it be `$filename=$args[1]`? And under if statement condition, where it says `&showstat(filedata)`, what does `&` mean? when I've looked it up, it meant "part of", but I am confused with this line that is written.


Unable to unregister vms

I have the following command to extract the name of virtual machines currently available in the host system.               vmslist=$(vboxmanage list vms | awk '{print $1}')      I pass this list to a for loop in order to unregister vms which are in the list as follwos:               for vm in $vmslist     do         echo $vm         vboxmanage controlvm $vm poweroff         vboxmanage unregistervm $vm --delete     done      The problem is that the vboxmanage command complains about the names. For example it says:               VBoxManage: error: Could not find a registered machine named '"SC-1"'      I don't understand where those single quotes around the name of vm come from! How can I solve this?


How to install C++ compiler for Eclipse

Im unable to run my C++ codes because Eclipse has not c++ compiler installed in it . How can I install C++ compiler for eclipse on Fedora 20 or other linux os's? When I execute my codes it says:               Launch fails. Binary not found.


find + grep to match exact keywords in a file

My script is not matching exact words only. Example: `12312312Alachua21321` or `Alachuas` would match for `Alachua`.               KEYWORDS=("Alachua" "Gainesville" "Hawthorne")     IFS=$'\n'     find . -size +1c -type f ! -exec grep -qF "${KEYWORDS[*]}" {} \; -exec truncate -s 0 {} \;


Reconfigure login through root ftp (lost ssh access)

My question is twofold. I need to somehow re-enable telnet and/or ssh in a device where I currently only have root ftp access. Also, if I am going about this wrong, please let me know. Details to follow... **Background** I have a special development board running Arm Linux with the 2.6 kernel. (The device is the 9G45, but that is not really relevant to my question.) I was happily monkeying around with settings and such, I somehow caused sshd to stop working. Upon restart, ssh connections were refused. **Troubleshooting** I have found that Lighttpd is working and serving up pages. This confirms that both network and some of the initialization works. I have found that vsftpd is functioning **and I do have root access here**. I can connect to telnet, but the documented default user named "guest" is not working. Neither is root. Using ftp, I determined that the sshd pid file is not present, so I assume it is not running. Unfortunately, connectiong via serial did not seem to work, but I have a support ticket out with the manufaturer, so maybe they will answer me. **Possible solutions** (needs refining) I figure that I may be able to get in through the root ftp access, monkey with an init script or something else, then possibly gain telnet access (or maybe set sshd to run later in the boot process). I am not really sure where to go from here. If someone could build on my possible solution or propose a new one it would be greatly appreciated.


CentOS Live CD won't install server

Sorry if this is a very nooby question, but it's my first time trying CentOS and I'm installing from Live-CD. I want to get a server up and running in VirtualBox but during installation no option for server or desktop comes up. From step by step guides I've seen online it should be the last option but my installation skips it entirely. Do I need a different ISO, or is there something else I'm not doing. Thanks in advance!


per process swapiness for linux

`/proc/sys/vm/swappiness` is nice but i want a knob that's per process like `/proc/$PID/oom_adj` so that i can make certain processes less likely than others to have any of their pages swapped out unlike memlock this doesn't prevent a program from being swapped and like nice the user by default can't make their programs less likely but only more likely to get swapped i think i'd a call this `/proc/$PID/swappiness_adj`


Problem pinging from a specific interface

I'm trying to ping from a specific interface, I have a wired and a wireless connection both going into my laptop. My wired adaptor `eth0` is on the IP 172.16.109.75   My wifi adaptor `wlan0` is on the IP 192.168.1.69 When I ping google with my `eth0` unplugged with the following command:               conneco@mcr-pc-29334:~$ ping -I wlan0 www.google.co.uk     PING www.l.google.com (74.125.230.115) from 192.168.1.69 wlan0: 56(84) bytes of data.     64 bytes from 74.125.230.115: icmp_seq=1 ttl=51 time=32.7 ms     64 bytes from 74.125.230.115: icmp_seq=2 ttl=52 time=28.7 ms     64 bytes from 74.125.230.115: icmp_seq=3 ttl=52 time=28.9 ms     64 bytes from 74.125.230.115: icmp_seq=4 ttl=52 time=28.3 ms      It works fine as expected. I plug my `eth0` cable in and run the same again:               conneco@mcr-pc-29334:~$ ping -I wlan0 www.google.co.uk     PING www.l.google.com (74.125.230.112) from 172.16.109.75 wlan0: 56(84) bytes of data.     From mcr-pc-29334.local (192.168.1.69) icmp_seq=2 Destination Host Unreachable     From mcr-pc-29334.local (192.168.1.69) icmp_seq=3 Destination Host Unreachable     From mcr-pc-29334.local (192.168.1.69) icmp_seq=4 Destination Host Unreachable     From mcr-pc-29334.local (192.168.1.69) icmp_seq=5 Destination Host Unreachable     From mcr-pc-29334.local (192.168.1.69) icmp_seq=6 Destination Host Unreachable     From mcr-pc-29334.local (192.168.1.69) icmp_seq=7 Destination Host Unreachable      By the output at the top it seems to send it from the `eth0` (which at work won't be able to ping because it gets blocked), but the `wifi` is another link to a separate network where I'm on the net directly and therefore sending the ping request from the `wlan0` should work. What's happening? How should I fix it?


ntp cannot open shared object file: Permission denied

On a server I haven't worked on, ntpd is broken:               # /etc/init.d/ntpd start     ntpd: error while loading shared libraries:       libz.so.1: cannot open shared object file: Permission denied      but permissions look right:               # locate libz.so.1 | xargs ls -l     lrwxrwxrwx root root /usr/lib64/libz.so.1 -> libz.so.1.2.3     -rwxr-xr-x root root /usr/lib64/libz.so.1.2.3     lrwxrwxrwx root root /usr/lib/libz.so.1 -> libz.so.1.2.3     -rwxr-xr-x root root /usr/lib/libz.so.1.2.3     -rw-r--r-- root root /usr/lib/vmware-tools/lib32/libz.so.1/libz.so.1     -rw-r--r-- root root /usr/lib/vmware-tools/lib64/libz.so.1/libz.so.1     -rw-r--r-- root root /usr/lib/vmware-tools/lib32/libz.so.1     -rw-r--r-- root root /usr/lib/vmware-tools/lib64/libz.so.1      `LD_LIBRARY_PATH` is empty and the server is 64 bit:               # uname -a     Linux my.server 2.6.18-128.el5 #1 SMP [...] x86_64 x86_64 x86_64 GNU/Linux      _Update:_               # ldd /usr/sbin/ntpd     libz.so.1 => /usr/lib64/libz.so.1      and               # ls -l /usr/lib64/libz.so.1     lrwxrwxrwx root root /usr/lib64/libz.so.1 -> libz.so.1.2.3     # ls -l /usr/lib64/libz.so.1.2.3     -rwxr-xr-x root root /usr/lib64/libz.so.1.2.3


Flash plugin installation error

Somehow I found a repository for fedora core 3 flash plug-in. When I tried to install the flash plug-in I have encountered this error. I can't figure it out what does it mean, or how to solve this error.               [root@g22 ~]# yum install flash-plugin     Setting up Install Process     Setting up Repo:  opennms-unstable-fc7     repomd.xml                100% |=========================|  951 B    00:00     Setting up Repo:  opennms-testing-fc7     repomd.xml                100% |=========================|  951 B    00:00     Setting up Repo:  flash     repomd.xml                100% |=========================| 1.9 kB    00:00     Setting up Repo:  opennms-stable-fc7     repomd.xml                100% |=========================|  951 B    00:00     Setting up Repo:  opennms-snapshot-fc7     repomd.xml                100% |=========================|  951 B    00:00     Reading repository metadata in from local files     opennms-un: ################################################## 23/23     opennms-te: ################################################## 25/25     flash     : ################################################## 4/4     opennms-st: ################################################## 22/22     opennms-sn: ################################################## 27/27     Resolving Dependencies     --> Populating transaction set with selected packages. Please wait.     ---> Downloading header for flash-plugin to pack into transaction set.     flash-plugin-9.0.48.0-a.i 100% |=========================| 5.9 kB    00:00     ---> Package flash-plugin.i386 0:9.0.48.0-a set to be installed     --> Running transaction check          Dependencies Resolved     Transaction Listing:       Install: flash-plugin.i386 0:9.0.48.0-a     Is this ok [y/N]: y     Downloading Packages:     flash-plugin-9.0.48.0-a.i 100% |=========================| 2.5 MB    06:10     warning: rpmts_HdrFromFdno: V3 DSA signature: NOKEY, key ID 8df56d05     public key not available for //var/cache/yum/flash/packages/flash-plugin-9.0.48.0-a.i386.rpm      Any little help is much appreciated. :)


Resize non-LVM ext4 root partition

How can I shrink/resize a non-LVM ext4 root partition? The problem is I can't unmount it and I don't have physical access.


Comparing two strings in Bash

I have the following `if` block in my bash script:               if [ ${PACKAGENAME} -eq kakadu-v6_4-00902C ]; then       echo "successfully entered if block!!"     fi      The script execution is not entering my `if` block even though `$PACKAGENAME` is equal to `kakadu-v6_4-00902C`. What am I doing wrong?


How to restrict ssh users to browse only /home/%u contents

Can I confine my users to their /home/%u directory using only OpenSSH configuration? From instructions I found on the Internet, I stopped the SSH server and appended the following to the `sshd_config` file:               Match group sftpusers         ChrootDirectory /home/%u         X11Forwarding no         AllowTcpForwarding no      I then started the SSH server again. FYI I have the users added to `sftpusers` group My users can still browse i.e `cd /` and are able to use cat command to list file content (`cat /usr/bin/test.sh`) in entire file structure on my system I'm running Ubuntu Server 12.04 LTS.


How to avoid overflowing the kernel printk ring buffer?

I'm trying to debug a linux driver and a particular piece of code is behaving very strangely. In order to see what's going on I've filled the code with printk statements so I can see exactly what the variables I'm interested in do as the code executes. Unfortunately, when printing the ring buffer with `dmesg` lots of lines appear to be randomly missing. Google tells me this is because I'm writing too much data to the ring buffer at once. I've tried increasing the ring buffer size to its maximum (1 << 21) and I've tried inserting udelays to slow the writing down but I'm still having the same problem. What else can I try?


How to set up ZFS with ZIL and L2ARC SSD?

I have been considering bcache and flashcache. However my friend suggested me something called ZFS. In fact it says that formating disk with ZFS can actually do the exact same thing without kernel remake or whatever. Here are some resources I found on the web http://constantin.glez.de/blog/2011/02/frequently-asked-questions-about-flash- memory-ssds-and-zfs It seems that it's true though there is no tutorial on how it is actually done > ...e you can come up with other great uses, but that almost always involves > some sort of intelligent distinction between data that is accelerated with > flash and data that is stored on regular disks. The beauty of ZFS is that it > does this job automatically for you. The beauty is exactly what I want. Okay I am convinced. I got a /sdc as a huge hard disk and I got /sdd as an ssd. Now how do I set things up so that the /sdd becomes the zil and l2arc and the /sdd becomes real storage? Can't we arrange that the zil and l2arc are in the same drive? I am using centosh. Don't know what version. I think I have a 120GB SSD. I would like 40GB for L2ARC 40GB for ZIL 40GB for ZIL mirror. That seems to be reasonable. Datas are cached anyway. If someone write something and before data is written to disk will L2ARC takes it from ZIL?


Hardlinks in Dropbox not updated

I want to create a backup of a single _.tex_ file. I created the hard link to the file (which is not in Dropbox directory, lets say it is A) inside Dropbox directory. I did this so because I do not want to backup other auxiliary file created (eg. axu, .log, .bbl etc.) when compiling the tex file. I edit and compile the tex file in A. The changes are reflected when I see the file inside Dropbox directory. But its is not synced with the online folder. However, If I change the file (hard link) inside the Dropbox directory, it gets synced. Please let me know what is the problem here. Please give the solution within what I am using and trying to do rather than proposing alternative solution for same task. I am using Fedora 13.


Get device node by major/minor numbers pair

Each device node under `/dev` has its own major/minor number pair. I know that we can retrieve this pair of numbers from the device node by means of `stat`, like this:               stat -c 'major: %t minor: %T' <file>      Or, `ls -l` also shows these numbers. But how can we get device node(s) by given major and minor numbers? The only way I'm aware of is some kind of `ls -l` + `awk` trick, but I really hope there is better solution.


jackd error ALSA: could not start playback (Cannot allocate memory)

I'm using a headless Raspberry pi setup using ssh from my mac. I recently purchased a Wolfson pi sound card and am trying to start JACK from the command line. When I type `jackd -d alsa`, I receive the following output:               jackdmp 1.9.9     Copyright 2001-2005 Paul Davis and others.     Copyright 2004-2012 Grame.     jackdmp comes with ABSOLUTELY NO WARRANTY     This is free software, and you are welcome to redistribute it     under certain conditions; see the file COPYING for details     JACK server starting in realtime mode with priority 10     control device hw:0     control device hw:0     audio_reservation_init     Acquire audio card Audio0     creating alsa driver ... hw:0|hw:0|1024|2|48000|0|0|nomon|swmeter|-|32bit     control device hw:0     configuring for 48000Hz, period = 1024 frames (21.3 ms), buffer = 2 periods     ALSA: final selected sample format for capture: 32bit integer little-endian     ALSA: use 2 periods for capture     ALSA: final selected sample format for playback: 32bit integer little-endian     ALSA: use 2 periods for playback     ALSA: could not start playback (Cannot allocate memory)     Cannot start driver     JackServer::Start() failed with -1     Failed to start server     control device hw:0     Released audio card Audio0     audio_reservation_finish     control device hw:0      I have already edited my `/etc/security/limits.conf` to ensure the `@audio` group has realtime priority of 95, unlimited memlock, and nice 15 (whatever that is). I also made sure my username (`pi`) is a member of the audio group. Any ideas?


In Linux count number of key presses except those in the browser

I want to count the number of key-presses in Linux, except those in the browser. There was a solution proposed here but not sure how to ignore browser key-presses.


How do I run two ongoing processes at once in linux/bash?

I would like to know how I can run two ongoing processes at the same time in Linux/bash. basically, I have a Node web server, and a MJPG-Streamer server. I want to run both these processes at once, but they are ongoing processes. I heard about running them as background processes, but I want them to be the same priority as a foreground process.


How can force my screen to unblank?

I've been doing a lot of looking around forums for different ways to unblank the screen. I am running embedded linux on a machine I have and I found out that the screen goes blank under certain conditions. I have my suspicions that this has to do with `consoleblank` but I haven't been able to find a way to reproduce the blanking consistently by either using setterm, or even changing the kernel parameters on bootup. So I'm trying to approach this from a different angle. I have my machine in the blanked state and I'm trying to wake it up to see if it is possible. Mouse input won't work, so I have telnet'ed into the machine and I am trying to wake it up. Running the command:               setterm -blank poke      returns "cannot force unblank" the following also produce that output:               setterm -term linux -blank poke     setterm -term linux -blank poke > /dev/tty02     setterm -term linux -blank poke > /dev/fb2      and a couple other variations do as well. How can I force my machine to unblank its screen? * * * UPDATE I have been looking into this screen blanking issue for over 2 days now and I finally at least found a way tp replicate the blanking. If I locally or remotely log into the system and do this: echo "4" > /sys/class/graphics/fb1/blank The screen blanks, input won't wake it up as per the case that comes up when I'm not expecting it. Then to unblank the screen I can do the following: echo "0" > /sys/class/graphics/fb1/blank This is all fine and dandy, but If I leave my machine on and it happens to blank the screen on its own, performing the second command does not wake up the display. The case where the blanking happens on its own is what is concerning me obviously and I am trying to determine what might undo it so that I can look more into preventing it from ever blanking in the first place.


How do I resolve a "rm: libtoolT: No such file or directory" error?

I'm doing a "portmaster -f" update on a machine just upgraded from FreeBSD 8.3 to 9.1 and am getting a "rm: libtoolT: No such file or directory" error. I see it's something that commonly afflicts Debian Linux distros, so I tried that fix (of adding a -f flag to the RM definition for the m4 processor). I also forced an autotool update and re-ran portmaster, same problem though. What should I try next?


Auto-switch to wifi

Need to connect to specific wifi point as soon as it is in range. If it is out of range, then system must stay connected LAN. In case, any wifi-point is in range, there must be auto-switch.


Copy only Specific text of a file to another

I have a file abc.txt the contents are               <classpathentry kind="src" path="Sources"/>     <classpathentry kind="con" path="WOFramework/ERExtensions"/>     <classpathentry kind="con" path="WOFramework/ERJars"/>     <classpathentry kind="con" path="WOFramework/ERPrototypes"/>     <classpathentry kind="con" path="WOFramework/JavaEOAccess"/>     <classpathentry kind="con" path="WOFramework/JavaEOControl"/>     <classpathentry kind="con" path="WOFramework/JavaFoundation"/>     <classpathentry kind="con" path="WOFramework/JavaJDBCAdaptor"/>      I want to copy all the paths into another file. That is I want my output text file to look like:                   WOFramework/ERExtensions         WOFramework/ERJars         WOFramework/ERPrototypes         WOFramework/JavaEOAccess         WOFramework/JavaEOControl         WOFramework/JavaFoundation         WOFramework/JavaJDBCAdaptor


Nested lists in man page

I have a command line parameter that takes a number of flags afterwards, which I would like to have as a list inside the parameter list in the man page. Currently I am simply making lines of `Flag - Description` (man page), but this is not ideal for the following reasons:   * Doesn't indent wrapped lines. I can manually indent them but then I have to assume a set console width, which I don't want to do   * Have to rely on double newlines to go to the next line, I'd rather have something like `.TP`.


set baud speed for tty

How do I set the baud speed for a specific tty (in this case a serial port)? I tried using               stty -F /dev/tty.iap ispeed 19200      But get the error `Invalid argument` for every speed I try (2400, 4800, etc.) except 9600 (the default). I can successfully change the speed in a C program using `cfsetspeed`. Do I need to make a change somewhere else, like the `ttys` file?


/usr/bin/ld: cannot find -lfl

After running the following command: `g++ lex.yy.c -lfl` I get the following error: `/usr/bin/ld: cannot find -lfl` How can I solve it?


Help fix corrupt GRUB

I have multiple partitions on the hard drive of my laptop (1 Crunchbang/Debian, 1 Windows, 1 Windows Recovery), I booted on the "recovery" partition for the first time and the graphics were completely wrong. I manage to find a way to reboot, and ever since, every time I try to boot, GRUB keeps crashing and my PC goes in a "launch/crash/launch/crash" loop. I had no problem booting on a Live CD though, and mounting the file system correctly. So I'm fairly sure it's simply a bootloader issue.   * What's the way to proceed now?    * How do I diagnose the issue?    * Can I avoid an unnecessary reinstall of the bootloader?    * What are the ircchans/forums/wiki/docs where I may find better answers?


Windows shell Escape key (delete whole line) equivalent in Bash

In Windows command line (powershell and cmd), when you press `Esc` key while on a line, whatever you have typed at the prompt is removed. I found that pressing `Esc` key at bash prompt does nothing. Pressing `Esc` and then `backspace` deletes a word, but this has to be done for each word. I am learning Bash incrementally and sometimes type something stupid in the middle of the line and feel that it is better to type from scratch again. To do this, pressing `backspace` is the only way I found until now. What do you do? I am aware of the `clear` command and `Ctrl-L` shortcut, but I am not talking about clearing the entire terminal. Just the line.


How can I make this System V init script start at boot?

I've installed udisks-glue on my Raspbian Raspberry Pi, along with a System V init script at `/etc/init.d/udisks-glue` (as per instructions here). I make it executable and run the following, which returns no errors.               sudo update-rc.d udisks-glue defaults      I can start the script fine, and it works as expected.               $ sudo service udisks-glue start     [ ok ] Starting Automounter: udisks-glue.     $ sudo service udisks-glue status     [ ok ] udisks-glue is running.      However, when I reboot, it's not running. This used to work fine, but I reinstalled a minimal system, and it no longer works. It's possible that I'm missing some packages.               $ sudo service udisks-glue status     [FAIL] udisks-glue is not running ... failed!      ## Troubleshooting I've tried to log output and errors by changing a line in the `start)` block to               start-stop-daemon --start --exec $DAEMON -- -p $PIDFILE &>> /tmp/udisks-glue.log      This file is empty on reboot. However, it does exist, suggesting that the script is at least partially executed. Finally, I've tried to confirm proper installation. Amongst other things, `locate udisks-glue` returns               /etc/rc0.d/K01udisks-glue     /etc/rc1.d/K01udisks-glue     /etc/rc2.d/S01udisks-glue     /etc/rc3.d/S01udisks-glue     /etc/rc4.d/S01udisks-glue     /etc/rc5.d/S01udisks-glue     /etc/rc6.d/K01udisks-glue      ## EDIT — Further troubleshooting I thought I might test if the script was acting too early, so I tested two possible solutions. Both failed. Firstly, I tried making the script run at a lower priority.               mv /etc/rc2.d/S{01,90}udisks-glue      Secondly, I reverted this then inserted `sleep 90` into the `start)` block, just before the `start-stop-daemon` invocation.


Cancelling execution of daemons during boot

During boot a series of predetermined daemons (such as dbus, hal, network) are started. Whenever I'm not connected to an Ethernet cable the network service will obviously fail, but before failing it stalls the boot process for something around 20 seconds. I'm probably asking too much, but it would be great to be able to manually force cancel the initialization of the network daemon (maybe by pressing some key). This way I could cancel it whenever the network cable isn't plugged, and avoid having to wait an extra minute or so. Is that possible?   I don't want to just remove _network_ from boot permanently.


File in Ubuntu equivalent to /etc/inittab file in RedHat

I searched a lot but can't get any solution. My question is what file in Ubuntu is equivalent to /etc/inittab file in RedHat. In RedHat /etc/inittab file contains the setting related to runlevel in which you want to boot the linux.


What is the best rtorrent.rc config for seeding?

My ~/.rtorrent.rc looks like this:               min_peers = 10000     min_peers_seed = 10000     encryption = require     dht = on     peer_exchange = yes      How can I configure my rtorrent.rc so that I could seed better? (or other tips?)


Vim Error 'E212: Cannot open file for writing', when trying to create new files outside of home dir

I am running Wheezy Debian. When I try to create a new file in a directory other than my home directory, such as `/var/www`, I get the following error in vim: > E212: Cannot open file for writing. I assume this is because I do not have the correct privileges to create files outside of my home directory? My user account is in the sudoers file with `(ALL=(ALL) ALL)`, and I have administrator access. I'm aware of tricks such as `:w !sudo tee %`, however this still results in a readonly file. What am I missing here?


Install pdflatex via SSH on Amazon EC2 instance

I need to install **pdflatex** on my Linux powered machine (Amazon EC2 instance, didn't decided yet which distribution would be the best so also feel free to give a hint) because I want to connect **pdflatex** & **PHP** to produce rendering of LaTeX code **to PDF** on my website (so user could type in LaTeX, click render and download a PDF, like http://www.scribtex.com). Can you give me some directions?


apache ldap authentication taking far too long

I configured apache2.2 (CentOS 5.6) to provide ldap authentication with Active Directory.               <Directory "/var/www/html">                  AuthType Basic             AuthName "Authenticate with domain account."             AuthBasicProvider ldap             AuthzLDAPAuthoritative on             AuthLDAPBindDN cn=Administrator,cn=users,dc=example,dc=com             AuthLDAPBindPassword secret             AuthLDAPURL ldap://192.168.56.110:389/dc=example,dc=com?sAMAccountName?sub?(objectClass=*)             Require valid-user             ...     </Directory>      It works, but it takes far too long. I analyzed the traffic with tcpdump.. the timestamps show exactly four minutes between the searchResEntry (when Active Directory respond with the DN of the user account I'm trying to log in) and the bindRequest (when apache try to bind as the requested user). Here is the error_log output for this:               [Sat Dec 10 07:06:37 2011] [debug] mod_authnz_ldap.c(390): [client 192.168.56.1] [2488] auth_ldap authenticate: using URL ldap://192.168.56.110:389/dc=example,dc=com?sAMAccountName?sub?(objectClass=*)          [Sat Dec 10 07:10:37 2011] [debug] mod_authnz_ldap.c(489): [client 192.168.56.1] [2488] auth_ldap authenticate: accepting peter          [Sat Dec 10 07:10:37 2011] [debug] mod_authnz_ldap.c(971): [client 192.168.56.1] [2488] auth_ldap authorise: declining to authorise          [Sat Dec 10 07:10:37 2011] [debug] mod_authnz_ldap.c(390): [client 192.168.56.1] [2475] auth_ldap authenticate: using URL ldap://192.168.56.110:389 dc=example,dc=com?sAMAccountName?sub?(objectClass=*), referer: http://192.168.56.200/projeto/          [Sat Dec 10 07:10:37 2011] [debug] mod_authnz_ldap.c(489): [client 192.168.56.1] [2475] auth_ldap authenticate: accepting peter, referer: http://192.168.56.200/projeto/          [Sat Dec 10 07:10:37 2011] [debug] mod_authnz_ldap.c(971): [client 192.168.56.1] [2475] auth_ldap authorise: declining to authorise, referer: http://192.168.56.200/projeto/          [Sat Dec 10 07:10:37 2011] [error] [client 192.168.56.1] File does not exist: /var/www/html/projeto/style.css, referer: http://192.168.56.200/projeto/          [Sat Dec 10 07:10:37 2011] [debug] mod_authnz_ldap.c(390): [client 192.168.56.1] [2475] auth_ldap authenticate: using URL ldap://192.168.56.110:389/dc=example,dc=com?sAMAccountName?sub?(objectClass=*), referer: http://192.168.56.200/projeto/          [Sat Dec 10 07:10:37 2011] [debug] mod_authnz_ldap.c(489): [client 192.168.56.1] [2475] auth_ldap authenticate: accepting peter, referer: http://192.168.56.200/projeto/          [Sat Dec 10 07:10:37 2011] [debug] mod_authnz_ldap.c(971): [client 192.168.56.1] [2475] auth_ldap authorise: declining to authorise, referer: http://192.168.56.200/projeto/      As you can see, it takes four minutes between the first and the second line. Any clue? Ps. Here is a link to the tcpdump capture displayed with wireshark. As you can see, Active Directory responds instantaneously. What takes too long is the bindRequest from apache (highlighted in the image).


GIT push only commits older than x months

Is there a way to specify push commits that are older than x months to remote y ? Like setting up a branch that automatically tracks master-(x months) and then push it to a separate remote?


Partclone error

I am trying to clone a disk in a VMware Machine The initial situation is: ![Disk list](http://i.stack.imgur.com/7u2TF.png) When cloning, I get the following error: ![Partclone](http://i.stack.imgur.com/TSYDf.png) Notes: The VM is bootstrapped with the Arch Linux ISO. `sda` is a physical flash disk, `sdb` is a virtual disk (VMDK).


What package is necessary to install for the getacl command?

CentOS 6.3 I'm studying Access Control Lists and for some reason, the getacl command isn't available. When I try running it, I get:               [root@foobox test] getacl test.txt     -bash: getacl: command not found      But if I grep RPM for packages, I see that **acl-2.2.49-6.el6.x86_64** is installed. Perhaps this isn't the right package? I've also confirmed that the filesystem mount has the acl option associated with it. What am I missing?


How can I run a grep on epub/mobi files?

Is there a way to do it, particularly on a set of multiple epub/mobi files in one directory?


How are ACL permissions processed and in what order do they apply to a given user action?

CentOS 6.4 I'm trying to better understand how filesystem ACL rules are processed and in what order ACL rules apply. For example, let's say users bob and joe belong to a group called sales. Let's also say that I have a sales document with the following details:               [root@Maui ~]# getfacl /home/foo/docs/foo.txt     getfacl: Removing leading '/' from absolute path names     # file: home/foo/docs/foo.txt     # owner: jane     # group: executives     user:: r--     user:bob:rw-     user:joe:rwx     group:sales:rwx     group::r--     mask::rwx     other::---      My question is, how are permissions processed in an example like this and what access privileges take precedence? Is there just a top-down search and whatever rule matches first is the one that applies? Or does Linux enforce access based on what is the most specific rule for the user in question? Or perhaps the most restrictive and applicable rule takes precedence?


How to set a new password from bash?

I'm using busybox with a limited passwd (I don't have --stdin option) and without `chpasswd` and I need to change the password of an user from bash. Here is my best result:               echo newpassword > pwdfile     echo newpassword > pwdfile     cat pwdfile | passwd myuser     Changing password for myuser     Enter the new password (minimum of 5, maximum of 8 characters)     Please use a combination of upper and lower case letters and numbers.     Enter new password:     Bad password: too simple.          Warning: weak password (continuing).     Re-enter new password:     passwd: The password for myuser is unchanged.


How do I mount a WD MyBook World network drive in linux?

I have a WD MyBook World NAS on my home network. I currently use this for Time Machine backups for my Mac but I'd also like to use it as a backup location for my linux box which is running Ubuntu Server. How can I mount this drive on the linux server so that my cron backups can use it as a backup destination? I have configured the WD drive with a static IP address which I assume would be important in the solution.


The brightness on my Lenovo SL510 only moves between 100% and 0%?

I have a Lenovo SL510 laptop running Linux Mint Debian Edition (based on Debian Testing) using the Cinnamon DE, and the brightness appears to only have two settings: 100% and 0%. If I use the brightness keys on the laptop and decrease the brightness, it immediately drops to 0%. The same thing happens if I increase the brightness; it automatically jumps to 100%. I get the same effect if I use the brightness widget in Cinnamon. From `lsmod`, these are the acpi kernel modules I have installed:               Module                  Size  Used by          thinkpad_acpi          61270  0     nvram                  13049  1 thinkpad_acpi     acpi_cpufreq           12935  1     snd                    52850  17 snd_timer,snd_seq_device,snd_seq,snd_rawmidi,thinkpad_acpi,snd_pcm,snd_mixer_oss,snd_pcm_oss,snd_hwdep,snd_hda_codec,snd_hda_intel,snd_hda_codec_realtek,snd_hda_codec_hdmi     rfkill                 19012  6 cfg80211,thinkpad_acpi,bluetooth     mperf                  12453  1 acpi_cpufreq     processor              28157  3 acpi_cpufreq      From `uname -r`, my kernel version is 3.2.0-4-amd64. What can I do to fix this, or what other information should I post to troubleshoot this?


Why doesn't cp have a progress bar like wget?

Please note that I don't ask _how_. I already know options like `pv` and `rsync -P`. I want to ask _why_ doesn't `cp` implement a progress bar, at least as a flag ?


What is a "recursive DNS query"?

Can someone explain in short what "recursive DNS query" means and how it can be considered _bad_?


Character count in Unix wc command

When I give wc command on a file with contents given below, it gives the number of characters as 30. Does it include the end of file character? Since including the space and newline there are only 29 characters.               Hello World     Again Hello World      The output is               2  5 30 test


Keep screen ratio while maximizing mplayer

I have a movie with a 1024x576 resolution while my screen resolution is 1280x800. How can I keep the ratio of 1024/576 while MPlayer is stretched to the whole screen?


Issues while untaring tarball with acl

I am getting an error “Unknown file type 'A', extracted as normal file” while un-taring a set of files which has acl permissions set. I had created the tar file in Solaris with `tar -cpfv Tarfilename.tar directory`. If I un-tar with `tar xvpf Tarfilename.tar`, it works great in Solaris. I had copied the tar file to Linux and tried to untar using `tar xvpf`, it throws the warning “Unknown file type 'A', extracted as normal file” and created files without ACL permissions. `tar --version` in Linux: `tar (GNU tar) 1.15.1`


Setting execution right to whole directory - is it good or bad idea?

I have a zip file containing lot of files and directories for a certain application which should be running on Linux. Some files needs to be set as executable, but the zip file format afaik does not preserve execution rights. I need to manually set the execution right on files after extracting the archive and (I am getting to it) my question is: If I do not know which files need to be executable, is it good idea to add the execution permission recursively to the whole directory? Can it posses any security risks? Is anyone aware of any other problems it may cause?


Why is the Provides field in the local Debian package ignored (DepCompareOp)?

I'm running Debian sid and want to use TeX Live from CTAN. So I didn't install the Debian texlive-packages, but created a virtual local package with `equivs`. You can find the control file below:               Section: misc     Priority: optional     Standards-Version: 3.9.4          Package: texlive-local     Version: 2014-1     Maintainer: Jens Kubieziel <jens@kubieziel.de>     Provides: chktex, biblatex, biblatex-dw, cm-super, cm-super-minimal, context,      dvidvi, dvipng, feynmf, fragmaster, jadetex, lacheck, latex-beamer,      latex-cjk-all, latex-cjk-chinese, latex-cjk-chinese-arphic-bkai00mp,      latex-cjk-chinese-arphic-bsmi00lp, latex-cjk-chinese-arphic-gbsn00lp,      latex-cjk-chinese-arphic-gkai00mp, latex-cjk-common, latex-cjk-japanese,      latex-cjk-japanese-wadalab, latex-cjk-korean, latex-cjk-thai, latexdiff,      latexmk, latex-sanskrit, latex-xcolor, lcdf-typetools, lmodern, luatex,      musixtex, passivetex, pgf, preview-latex-style, prosper, ps2eps, psutils,      purifyeps, t1utils, tex4ht, tex4ht-common, tex-gyre, texlive, texlive-base,      texlive-bibtex-extra, texlive-binaries, texlive-common, texlive-extra-utils,      texlive-fonts-extra, texlive-fonts-extra-doc, texlive-fonts-recommended,      texlive-fonts-recommended-doc, texlive-font-utils, texlive-formats-extra,      texlive-games, texlive-generic-extra, texlive-generic-recommended,      texlive-humanities, texlive-humanities-doc, texlive-lang-african,      texlive-lang-all, texlive-lang-arabic, texlive-lang-cjk, texlive-lang-cyrillic,      texlive-lang-czechslovak, texlive-lang-english, texlive-lang-european,      texlive-lang-french, texlive-lang-german, texlive-lang-greek,      texlive-lang-indic, texlive-lang-italian, texlive-lang-other,      texlive-lang-polish, texlive-lang-portuguese, texlive-lang-spanish,      texlive-latex-base, texlive-latex-base-doc, texlive-latex-extra,      texlive-latex-extra-doc, texlive-latex-recommended,      texlive-latex-recommended-doc, texlive-luatex, texlive-math-extra,      texlive-metapost, texlive-metapost-doc, texlive-music,      texlive-omega, texlive-pictures, texlive-pictures-doc, texlive-plain-extra,      texlive-pstricks, texlive-pstricks-doc, texlive-publishers,      texlive-publishers-doc, texlive-science, texlive-science-doc, texlive-xetex,      thailatex, tipa, tipa-doc, xindy, xindy-rules, xmltex     Architecture: all     Description: My local installation of TeX Live 2013.      A full "vanilla" TeX Live 2013      http://tug.org/texlive/debian#vanilla      I used `equivs-build` to create the Debian package and installed it. However when I open `apt-get`, `aptitude` or other package managers I get the following message: > W: Ignoring Provides line with DepCompareOp for package texlive-latex-base It advises to call `apt-get update` which I did, but the message stays. Why does this message appear and what can I do to correct this warning? The package `texlive-latex-base` not installed:               > apt-cache policy texlive-latex-base     texlive-latex-base:       Installed: (none)       Candidate: 2013.20140215-1


Unable to open EPS files

I am unable to open eps files in my machine. I have attached the screenshots of what happens when try to view a eps file with default pdf viewer and ghost script viewer (gv). The condition is same with all eps files. All of them are working fine in my windows work station. You can see that the ghostviewer gives some error related to the helvetica font. I have same issues while compiling tex files which includes this eps files. It is not at all displayed. All the eps files are generated from MATLAB which I believe embeds helvetica fonts by default. UPDATE: I checked generic eps files from internet, they work fine. So, the ones with a particular font embedding won't work. Any help will be really appreciated. The distribution is fuduntu 2013.1. ![image 1](http://i.stack.imgur.com/TH5Tx.png) ![image 2](http://i.stack.imgur.com/0JN86.png)


rpd over https using a linux client

I posted this on SuperUser but I thought _this_ would be the better audience. (So sorry for crossposting...) My employer switched from vpn and rdp to using what our admin calls "rdp over https". Since that switch I find myself unable to connect to the "new" rdp server. I _think_ the progress is as follows:   * A rdp gateway-server is connected via tls   * the requested sever (different from the gateway-server) is then connected through the tls connection. In windows mstsc-settings the server name is the "internal network name" of the machine I wish to connect. And on the last tab (in German it is called "leistung" - could be activity) I go to the "connection from everywhere" settings and set the gateway-server under gateway-server. Now:   Is there **any** way to use this scenario under linux (apart from a virtual machine running Windows)?   I am interested in   * free ideas (e.g. is it possible to create a tls tunnel and connect through that using freerdp/rdesktop?)   * non-free ideas. As long as they work I'll worry about the costs later. Free ideas would be better :-) On SuperUser I got the idea to expose an ssh server and tunnel rdp through it. This is a valid idea but not feasible in my case. I really need a Idea to connect to the rdp server via the gateway-server.


Gnome menu panel blank space

I'm having a problem in the top menu panel since a couple of days, some space has been created between some icons and I don't know how to remove it. A screendump: ![alt text](http://i.stack.imgur.com/ddW4P.png) Does anyone know what the reason could be for it? By the way, I'm using Ubuntu Lucid (should I ask in the ubuntu site?). Thanks Edited: This is how it looks like now, still one blank space, but much better (I guess it has something to do with the question from Michael's link) ![alt text](http://i.stack.imgur.com/5V3m8.png) Edit 2: After a reboot, the blank space was gone so solved :)


bash script [ x$1 = x ]

I am reading bash script I do not understand what is going there.               #!/bin/sh     [ x$1 = x ]       What is going on the second line and what `[ x$1 = x ]` mean?


How can I share files between two Linux machines over LAN?

I am currently running Fedora 18 with Gnome on two computers which are connected to the same router. I have been using Samba to share files between the two, but I know there must be a better way. On the left panel in Nautilus, there is a menu for me to access my other computer's shared directories via Network -> Browse Network -> Windows Network -> Computer. **What is the way to accomplish a similar way to access a shared directory between two Linux machines, without going through the "Windows Network"?** Preliminary research suggests that using SSH to mount a remote directory may be what I'm looking for, but when I SSH into the other computer, I am left at the console scratching my head. If that is the correct method, I would greatly appreciate it if someone would offer some insight on how to accomplish the sharing.


Does Fedora 16 do automatic system updates?

I typically use KDE except when I have to do some things that are broken in KDE such as starting a new Eclipse workspace, due to some graphic components Eclipse uses upon that action that are present in GNOME and not in KDE. So today I went into GNOME after several days to start a new Eclipse project and was surprised that the DE layout was different than before. E.g. the apps are organized in a tree by category in the upper left corner and, unlike before, there is an open app bar at the bottom (which is awesome because the lack thereof was what got me to switch to KDE in the first place). However, I never performed a system update on request. Since GNOME obviously got changed, without me going to `yum` or any other system update tool, I suspect that the OS is configured to do system updates on its own. However, I would still like to be notified of pending updates and be asked to authorize them. How can I view the system update preferences/configuration and change them?


Bluejeans on Linux 32

I am trying to access Bluejeans on a Scientific Linux 32 OS . It directs me to a plugin which is incompatible with this system . Is there a plugin for 32 bit ? Thanks


Delete the last character of a string using string manipulation in shell script

I would like to delete the last character of a string, I tried this little script :               #! /bin/sh           t="lkj"     t=${t:-2}     echo $t      but it prints "lkj", what I am doing wrong? Thank you in advance!


Disable mounting to `$HOME/.gvfs`

I am using Debian Wheezy with Xfce and Thunar. Thunar (and other similer managers) enables e.g. connecting to SSH server using SFTP address like `sftp://mysvr/` and browsing it like a local folder. I normally access my remote box via command line, but occasionally I appreciate this GUI sugar. However, in default configuration, this has a pretty annoying downside: File systems accessed this way are automatically mounted under folder `$HOME/.gvfs`, which creates quite a nightmare for tasks that involve traversing through home folder (typically dotfile searching, or analyzing disk space usage issues). GNOME 2.2 RNs say: > GVFS also offers a FUSE mountpoint in ~/.gvfs/ so that GVFS mounts _can be > exposed to legacy applications_ using standard POSIX IO. So I guess it's possible to turn this off (I assume by legacy they don't mean Nautilus and the likes). However, I can't seem to find any information on how to do it. Any pointers?


How to bzip a file with minimum cpu percentage?

I am using bzip2 to compress a file,the process takes more that 100% cpu.Is there any way to run bzip2 with minimum CPU precentage.


Is Perl obsolete?

Is it worth learning Perl or it is an obsolete language and other languages should be learned instead of it? I am a newbie and I would appreciate it if someone could shed light on this subject and give me some advices.


What are some enterprise level linux distributions

I've been trying to get a comprehensive list of enterprise linux distributions but all I can find is Red Hat. Also, does such a thing truly exist or is Red Hat an anomaly. Surely once a distro becomes more and more mission critical, we're into global unix suppliers e.g. IBM (AIX) & Oracle (Solaris).


cron ignores variables defined in ".bashrc" and ".bash_profile"

I have defined "SHELL" variable in /etc/crontab file:               [martin@martin ~]$ grep SHELL /etc/crontab      SHELL=/usr/local/bin/bash     [martin@martin ~]$ file /usr/local/bin/bash     /usr/local/bin/bash: ELF 32-bit LSB executable, Intel 80386, version 1 (FreeBSD), dynamically linked (uses shared libs), for FreeBSD 8.0 (800107), stripped     [martin@martin ~]$       In addition, all my scripts in /etc/crontab file are started under user "martin". However _/home/martin/.bash_profile_ (for login shell) and _/home/martin/.bashrc_ (for non-logging shell) contain some variables which are ignored in case of cron job, but are used in case I log into machine over SSH or open new bash session. Why cron ignores those variables? Isn't cron simply executing "/usr/local/bin/bash my-script.sh" with permissions for user "martin"?


Two monitors: intel VGA + Nvidia DVI

Recently I've bought a GA-Z87-HD3 motherboard and a GTX 660 graphics card. Now I have two monitors, the first that I'm using is attached to the DVI port of the Nvidia graphic card, the second one is attached on the VGA port of the embedded graphic card of the motherboard. Since I would like to play a little with Blender, I need to use two monitors at the same time because in this way I can watch better more video tutorials at the same time. I'm using Debian wheezy:               #uname -a     Linux ziomario-Z87-HD3 3.2.0-4-amd64 #1 SMP Debian 3.2.60-1+deb7u1 x86_64 GNU/Linux     # lspci -nn | grep VGA     00:02.0 VGA compatible controller [0300]: Intel Corporation Haswell Integrated Graphics Controller [8086:0412] (rev 06)     01:00.0 VGA compatible controller [0300]: NVIDIA Corporation Device [10de:11c0] (rev a1)      So please can someone help me to use my two monitors together?


How can I make mailx inform me of new mail?

I'm trying to set up mailx on my server. On one server (Raspbian) I am informed of new mail with a message `You have new mail` (or something similar). On another machine (Raspbmc), I never have this notification. On both machines, `~/.bashrc` is essentially identical. `/etc/mail.rc` doesn't exist on the latter system, but it does on the former, with the following content.               set ask askcc append dot save crt     ignore Received Message-Id Resent-Message-Id Status Mail-From Return-Path Via Delivered-To      * * * ## EDIT I should also mention that I'm connecting via SSH. As implied here, I tried copying `/etc/pam.d/sshd` from the working Raspbian server to the broken Raspbmc server, and logging out and back in, but it didn't fix the problem. This file contains               # Print the status of the user's mailbox upon successful login.     session    optional     pam_mail.so standard noenv # [1]      Finally, I've also confirmed that the access time of `/var/mail/pi` is earlier than the modification time. (The filesystem is mounted with `noatime` anyway.)


Debian 7.5 & Supermicro A1SAM-2750F

Has anyone had success with Debian 7.5 & getting the onboard NIC's of the Supermicro A1SAM-2750F to work?!?


GNOME Login Theme Downloads (Mint 16 Petra)

I am running **Linux Mint 16 Petra Mate** and I am trying to figure out why I am unable to **add a downloaded login theme** from gnome-look.org This is the theme I want to install. However, the Login Window manager doesn't recognize the _Theme archive_ I have done some searching around and most sites say I have to type the command               echo $DESKTOP_SESSION      to figure out if I am using GNOME My terminal just replies with `default` . Guessing I am not quite there yet?


How to handle bounce mail sent to the VERP address

We have our postfix configured to handle mail for our websites. For every website we have configured a bounce handling user with               local_recipient_maps = hash:/etc/postfix/recipient_maps      The file recipient_maps looks like:               site1_bounce@our-domain.com          site1_bounce/     site2_bounce@our-domain.com          site2_bounce/     ...      We're using lmtp for postfix to communicate with dovecot with local delivery:               local_transport = lmtp:unix:private/lmtp-dovecot      When one of our websites sends mail it uses the postfix VERP feature by using the senmail command options               /usr/sbin/sendmail -XV -t -i      All of this works nicely, and we're getting bounces in different IMAP folders. By checking the reputation of our mail server I stumbled over one RBL that black lists our mail server, http://v4bl.org. If I understand the informations correctly the reason for this is because we fail 1 test that can be checked out here http://multirbl.valli.org/fcrdns-test/ If I choose "test by sending an email" I'm getting 1 error, namely, the test program tries to send an email to our envelope RCPT TO address, that is e.g.               site1_bounce+testuser=testdomain.tld@our-domain.com      which obviously fails because we don't have a local mail account for every generated VERP address. One real world case would be that a recipient mail server accepts a mail from our postfix and sends a bounce mail later to the RCPT TO address. So how do we map those VERP addresses back to our bounce handling mail accounts? We tried our luck with               alias_maps = regexp:/etc/postfix/verp_alias_maps      with verp_alias_maps being:               /^site1_bounce\+.+@our-domain.com/       site1_bounce     /^site2_bounce\+.+@our-domain.com/       site2_bounce     ...      but it appears as postfix ignores our ailas_maps file.


Guest OS Ubuntu 12.04 no network connection

Recently added a new `*.VDI` image with Ubuntu 12.04 to my existing VirtualBox. The machine hangs with a "Waiting for network configuration" error, eventually times out after 60 seconds and boots in command line mode. How can I activate the GUI mode for this machine? Some useful information:               cat /etc/network/interfaces          # The loopback network interface     auto lo     iface lo inet loopback          # The primary network interface     auto eth0      iface eth0 inet dhcp          ip link      1: lo: <LOOPBACK,UP,LOWER_UP> ..     2: eth1: <BROADCAST, MULTICAST> ..      I tried to use the below command:               ifup eth0       it fails with following error message:               cannot find device "eth0" Failed to bring up eth0       `ifconfig` didn't show any `eth*` and I am confused now. Can anyone help?


VNUML - 'brctl' command doesn't work in xterms

I have installed vnuml and bridge-utils on my machine, but am unable to run the brctl command on the xterm terminals that popup after building the simulation. I get a 'command not found' error. I am, however, able to run the brctl command on my host machine's terminal, so the package is there, only the virtual nodes created are not able to access it. What needs to be done to make the 'brctl' command available to each of the UML terminals?


Does character 'ä' in usernames cause bugs in linux systems?

I want to use my first name as an username but it contains character 'ä'. I found this thread. Now I understand, why some some characters are disabled, but what about 'ä'? Can this character cause any problems? Why are some unicode characters (ü, õ, ö, ä) disabled, when they are used in full names?


How to start racoon VPN IKE negotiation automatically?

I have configured racoon at two ends (with pre-shared keys) and trying to establish tunnel. But I have to initiate traffic to start IKE negotiation. Is there any alternative to establishing the tunnel automatically? If I don't send traffic to the remote end, the tunnel will not be established. In StrongSwan there is `auto=[start|add]` option to disable/enable auto connect. But, I can't find any configuration in racoon.


How to change the style of the analogue clock in XFce?

The XFce4 clock applet has an option to display an analogue clock. I found that this clock is not easy to read and the appearance does not match the rest of the desktop. Is there any way to configure the appearance of this clock?


How to add a launcher that compiles some code in a terminal in XFce?

I have a few files on my computer that I need to compile frequently while editing, e.g.:               context file.tex      I tried to add a launcher to the XFce4 panel that will open `xfce4-terminal` and compile this code, however, none of the commands I try in the launcher preferences window work. How can I add a launcher to the XFce panel which opens a terminal, compiles, and after finishes leaves the terminal open?


Mysql import the most recent file from a directory

I have a directory with daily backups of my entire MySQL database.   I want to import the most recent backup into the database. I know to import a backup I need to use `mysql -u root -ppasswordhere < backup.sql` I've managed to get the most recent file with `ls -Art | grep '.sql' | tail -n 1`, but I don't really know how to pipe the output to the command `mysql -u root -ppasswordhere` I am sure the answer is really obvious, I'm just confused.


Backing up and restoring a system user account

How would I go about completely backing up a user account and restoring it on a new system? The Home directory is just 'copy-and-paste'. But then what about things like the account password; and its UID and GID? The accounts are being used by Dovecot SASL to provide authentication for Postfix, services, and other applications. So I'm worried that I won't get everything in the backup; or risk not being able to fully recover the valuable user data. _The system is Ubuntu 11.04._


Tmux xclip copy no longer working

On mu ubuntu 12.04 setups my tmux clipboard copy and paste commands are setup as follows:               set -g prefix M-a     unbind C-b     bind C-c run "tmux save-buffer - | xclip -i -sel clipboard"     bind C-v run "tmux set-buffer \"$(xclip -o -sel clipboard)\"; tmux paste-buffer"      This worked great for the longest time up until a month or so ago, when I suspect some configuration change or package change was made that broke the above. In GNOME terminal, pasting still works fine with both prefix + C-v and CTRL-SHIFT-v. However the xclip copy command no longer works no matter what I do, and I have tried removing the custom prefix binding above, using -select instead of -sel, not using "clipboard" etc. This is pretty much a show stopper for a GVim user like me, since I don't even have the GNOME terminal workaround of CTRL-SHIFT-c with tmux taking over the shell. I go into copy mode, select text with SPACE + movement, and when I execute prefix + C-c absolutely nothing happens. Before this broke, tmux would display a confirmation message in the notification section at the bottom. Does anybody have suggestions as far as how one might debug this? This is a pretty big productivity hit. I can probably use the temporary file workaround trick for now, but it'd be great to know just what happened to xclip.


How can I move a file to another user's directory?

I'm using CentOS 6 and I'm trying to move a file from USER A to USER B but I keep getting permission denied. What do I need to edit to allow to me to put files from one user's directory into another's?


file_mode and dir_mode do not work when sharing ext3 drive via cifs

I have a ext3 drive connected to my router and shared via CIFS protocol. I wan't to mount it with certain permissions for each file/directory. Permissions are 2770 for both. Here's my /etc/fstab entry:                //<ip>/<disk>       /mnt/<disk>     cifs            username=****,password=****,_netdev,users,noauto,uid=0,gid=34,file_mode=2770,dir_mode=2770       0 0      With the above entry mount returned the following error:               WARNING: 'file_mode' not expressed in octal.     WARNING: 'dir_mode' not expressed in octal.      I've tried changing each "2" in front with "0" and then mount stops complaining, but all files and directories are mounted with 777 permissions.


Grep for string in first line of all files in directory and descendants

How can I grep for a given string in all files in the current directory, and recursively so, only considering the first line? (the #! line, if present, but only if #! is in the -first- line)?


Why is not every variable initialized to its data type specific default value upon declaration in Bash?

When I execute the following code in Bash version "GNU bash, version 4.1.10(4)-release (i686-pc-cygwin)", I get:               declare a     declare -p a     # Output: -bash: declare: a: not found     declare -i b     declare -p b     # Output: -bash: declare: b: not found     declare -a c     declare -p c     # Output: declare -a c='()'     declare -A d     declare -p d     # Output: declare -A d='()'      Arguably I think that the above variables should either be initialized in all cases or in none of them. That would seem more consistent rather than initializing only arrays upon declaration.


difference between windows local admin and unix root

I am trying to understand what is a conceptual difference between unix root account and windows local admin. I am a developer and despite IT department efforts were always given local admin rights so I could install whatever I want on my local PC. But for some reason (and I think it should be a good one) I am just a user in our linux system. That makes it is impossible to me to sudo things - e.g. to get software installed from repositories, etc. I suppose it is because root permissions grant much more privileges than local admin rights on windows. Is that the case? Also is it possible in unix to grant particular user rights to install software e.g. using apt-get or yum?


How do I go about tracking down IO usage in Linux and other *nix OS'?

Occasionally, something on my system starts hammering the disk. I would like to log data that would let me know about I/O usage per process, then I could go back to it later and see what keeps doing this. How should I go about solving this problem? Bonus points for solving this for arbitrary block devices.


Alternative to xxd for QNX

I was just introduced to `xxd` today. See link. I am very familiar with the QNX `hd` and `od`commands, both of which will take input and create a hex dump (or octal dump if you like). See hd and od. What I am looking for is the `xxd -r` capability to go backwards from a hexdump to a binary file, but apparently QNX doesn't have that, or I'm not reading the description appropriately. Can someone point me in the right direction? This is regarding QNX Neutrino 6.4.1 or newer.


Default printer in KDE 4 printer dialogs

How can I configure CUPS and/or KDE so that my printer is the default when I hit print in any KDE application (as opposed to the PDF printer)? It is set as default in CUPS, but that seems to have no impact on KDE.


finger and who commands usage

I know that the `finger` command used to display information about local and remote users. `finger` --> display users log in on local machine, even if remotely. `finger @hostname` --> display users log in on the remote machine. `finger user@hostname` --> I don't know what is it used for? and `who` command used to know info about the local machine users only, is it true?


Where do file managers save their bookmarks?

In pcmanfm and Thunar you can add bookmarks of folders to the left bar. Are they stored somewhere in the filesystem as symlinks? I´d like to use the bookmarks from other applications (terminal etc.), too.


Use bash history file from old machine when setting up new machine?

I love my bash history. Sometimes I've issued really long commands and I really depend on my bash history to get them back quickly. I've increased my history size with:               HISTSIZE=100000     HISTFILESIZE=200000      in my .bashrc I also have aliases:               alias h='history | tail'     alias hg='history | grep'      which allow me to do `h` and `hg some_text` which is _really_ handy My question is: Can I move this history file to a new machine? For instance my machine recently crashed and I had to rebuild it. Would I have any issues dropping a different .history file in, possibly replacing the one already there. Do I need to make sure to replace it or can I actually append two history files together without issue?


Using sshpass, return code (exit status) differs for reasons unknown using valid commands

There are a few things going on here but I think ultimately, either CLish or SSH is returning an exit code that is messing up my work flow. I'm attempting to connect to a remote machine (CLish shell) using sshpass. The script that is being run is exiting with "exit 0" (and works when I call it directly on my local machine) but the exit code that is returned to my local shell is "255". Yes, confusing, I know, but maybe an example will help. I think I've narrowed down my problem to a simple example. Connect to server running CLish and drop to bash shell in single command from local machine to server:               me@local$ sshpass -p 'password' ssh -t user@172.16.5.4 'shell'     user@server:~$ exit 0     exit     Connection to 172.16.5.4 closed.      Back on my machine, check the exit code:               me@local$ echo $?     255      Manually drop to shell on the remote machine with `sshpass` and CLish:               me@local$ sshpass -p 'password' ssh user@172.16.5.4     CLishPrompt> shell     me@server$ exit     exit     CLishPrompt> exit     Connection to 172.16.5.4 closed.      Check the exit code back on my machine:               me@local$ echo $?     0      I really need to issue the 'shell' command in the same sshpass call as in the first example because I am using redirection to write a script to the server's filesystem and run it (all in a single call). I would like it to return an exit code of "0" like the second example shows. I have been unable to find a work-around this problem. The reason I need exit code "0" is because this script is returning its findings in a Jenkins-CI "build" and I don't know how to tell Jenkins-CI to accept an exit code of 255. If this was bash, then I could check the exit code myself and continue on to the next part of my script. I need to either get ssh to return "0" or tell Jenkins that "255" is okay in this instance. Do you know what's going on here or have any suggestions?


Transfer 150GB of files from an old MacBook Pro with Ubuntu 13.04 Live DVD

My girlfriend's old MacBook Pro 2009 (5,4) stopped working. I have tried several times to reinstall OS X, but could not do so. There appears to be something really really wrong with the OS. Since she is not opposed to the idea of using Ubuntu instead of OS X, I am currently trying to transfer all of her files to my Linux machine using an ethernet crossover cable. Since OS X does not work at all, I am using the Ubuntu 13.04 live DVD to access her files. At first I thought the job would be simple. My plan was to set up network interfaces, plug in the crossover cable, set up an NFS share on the Macintosh HD, and `rsync` all 150GB of her files over to my machine. Then install Ubuntu 13.04 as the sole operating system, and transfer the files back over. But, alas, things are not that simple. NFS doesn't seem to like Apple's HFS+ filesystem. At least, I can not get it to work. I also can not find information about how to configure it. Since all of that takes time, I'm wondering if there's a simpler, better solution. I thought of using an `rsync` daemon, but since both computers are running Ubuntu (the client is using 12.10), and since I can mount the HFS+ hard drive in order to browse through her files, and since both computers can `ping` each other, it just seemed like there would be an easier way to do this than trying to configure NFS.


How to only output commands from CRON?

INPUT:               * * * * * ( /path/to/foo -x )     3 * * * * /full/path/tothing     3 3,2,4 * * * /full/path/tothing4 3      OUTPUT:               ( /path/to/foo -x )     /full/path/tothing     /full/path/tothing4 3      **Q:** How can I truncate the line until the fifth space?


List a directory, including subdirectories, with file count and cumulative size

Is there a way to list out the content of a directory including subdirectories with a file count and cumulative size? I would like to see:   * Number of directories   * Number of sub directories   * number of files   * cumulative size


Determining cause of Linux kernel panic

I'm running an Ubuntu 12.04 derivative (amd64) and I've been having really strange issues recently. Out of the blue, seemingly, X will freeze completely for a while (1-3 minutes?) and then the system will reboot. This system is overclocked, but very stable as verified in Windows, which leads me to believe I'm having a kernel panic or an issue with one of my modules. Even in Linux, I can run LINPACK and won't see a crash despite putting ridiculous load on the CPU. Crashes seem to happen at random times, even when the machine is sitting idle. How can I debug what's crashing the system? On a hunch that it might be the proprietary NVIDIA driver, I reverted all the way down to the stable version of the driver, version 304 and I still experience the crash. Can anyone walk me through a good debugging procedure for after a crash? I'd be more than happy to boot into a thumb drive and post all of my post-crash configuration files, I'm just not sure what they would be. How can I find out what's crashing my system? Here are a bunch of logs, the usual culprits. **.xsession-errors** : http://pastebin.com/EEDtVkVm **/var/log/Xorg.0.log** : http://pastebin.com/ftsG5VAn **/var/log/kern.log** : http://pastebin.com/Hsy7jcHZ **/var/log/syslog** : http://pastebin.com/9Fkp3FMz I can't even seem to find a record of the crash at all. Triggering the crash is not so simple, it seem to happen when the GPU is trying to draw multiple things at once. If I put on a YouTube video in full screen and let it repeat for a while or scroll through a ton of GIFs and a Skype notification pops up, sometimes it'll crash. Totally scratching my head on this one. The CPU is overclocked to 4.8GHz, but it's completely stable and has survived huge LINPACK runs and 9 hours of Prime95 yesterday without a single crash. ## Update I've installed `kdump`, `crash`, and `linux-crashdump`, as well as the kernel debug symbols for my kernel version 3.2.0-35. When I run `apport-unpack` on the crashed kernel file and then `crash` on the `VmCore` crash dump, here's what I see:                     KERNEL: /usr/lib/debug/boot/vmlinux-3.2.0-35-generic         DUMPFILE: Downloads/crash/VmCore             CPUS: 8             DATE: Thu Jan 10 16:05:55 2013           UPTIME: 00:26:04     LOAD AVERAGE: 2.20, 0.84, 0.49            TASKS: 614         NODENAME: mightymoose          RELEASE: 3.2.0-35-generic          VERSION: #55-Ubuntu SMP Wed Dec 5 17:42:16 UTC 2012          MACHINE: x86_64  (3499 Mhz)           MEMORY: 8 GB            PANIC: "[ 1561.519960] Kernel panic - not syncing: Fatal Machine check"              PID: 0          COMMAND: "swapper/5"             TASK: ffff880211251700  (1 of 8)  [THREAD_INFO: ffff880211260000]              CPU: 5            STATE: TASK_RUNNING (PANIC)      When I run `log` from the `crash` utility, I see this at the bottom of the log:               [ 1561.519943] [Hardware Error]: CPU 4: Machine Check Exception: 5 Bank 3: be00000000800400     [ 1561.519946] [Hardware Error]: RIP !INEXACT! 33:<00007fe99ae93e54>      [ 1561.519948] [Hardware Error]: TSC 539b174dead ADDR 3fe98d264ebd MISC 1      [ 1561.519950] [Hardware Error]: PROCESSOR 0:206a7 TIME 1357862746 SOCKET 0 APIC 1 microcode 28     [ 1561.519951] [Hardware Error]: Run the above through 'mcelog --ascii'     [ 1561.519953] [Hardware Error]: CPU 0: Machine Check Exception: 4 Bank 3: be00000000800400     [ 1561.519955] [Hardware Error]: TSC 539b174de9d ADDR 3fe98d264ebd MISC 1      [ 1561.519957] [Hardware Error]: PROCESSOR 0:206a7 TIME 1357862746 SOCKET 0 APIC 0 microcode 28     [ 1561.519958] [Hardware Error]: Run the above through 'mcelog --ascii'     [ 1561.519959] [Hardware Error]: Machine check: Processor context corrupt     [ 1561.519960] Kernel panic - not syncing: Fatal Machine check     [ 1561.519962] Pid: 0, comm: swapper/5 Tainted: P   M     C O 3.2.0-35-generic #55-Ubuntu     [ 1561.519963] Call Trace:     [ 1561.519964]  <#MC>  [<ffffffff81644340>] panic+0x91/0x1a4     [ 1561.519971]  [<ffffffff8102abeb>] mce_panic.part.14+0x18b/0x1c0     [ 1561.519973]  [<ffffffff8102ac80>] mce_panic+0x60/0xb0     [ 1561.519975]  [<ffffffff8102aec4>] mce_reign+0x1f4/0x200     [ 1561.519977]  [<ffffffff8102b175>] mce_end+0xf5/0x100     [ 1561.519979]  [<ffffffff8102b92c>] do_machine_check+0x3fc/0x600     [ 1561.519982]  [<ffffffff8136d48f>] ? intel_idle+0xbf/0x150     [ 1561.519984]  [<ffffffff8165d78c>] machine_check+0x1c/0x30     [ 1561.519986]  [<ffffffff8136d48f>] ? intel_idle+0xbf/0x150     [ 1561.519987]  <<EOE>>  [<ffffffff81509697>] ? menu_select+0xe7/0x2c0     [ 1561.519991]  [<ffffffff815082d1>] cpuidle_idle_call+0xc1/0x280     [ 1561.519994]  [<ffffffff8101322a>] cpu_idle+0xca/0x120     [ 1561.519996]  [<ffffffff8163aa9a>] start_secondary+0xd9/0xdb      `bt` outputs the backtrace:               PID: 0      TASK: ffff880211251700  CPU: 5   COMMAND: "swapper/5"      #0 [ffff88021ed4aba0] machine_kexec at ffffffff8103947a      #1 [ffff88021ed4ac10] crash_kexec at ffffffff810b52c8      #2 [ffff88021ed4ace0] panic at ffffffff81644347      #3 [ffff88021ed4ad60] mce_panic.part.14 at ffffffff8102abeb      #4 [ffff88021ed4adb0] mce_panic at ffffffff8102ac80      #5 [ffff88021ed4ade0] mce_reign at ffffffff8102aec4      #6 [ffff88021ed4ae40] mce_end at ffffffff8102b175      #7 [ffff88021ed4ae70] do_machine_check at ffffffff8102b92c      #8 [ffff88021ed4af50] machine_check at ffffffff8165d78c         [exception RIP: intel_idle+191]         RIP: ffffffff8136d48f  RSP: ffff880211261e38  RFLAGS: 00000046         RAX: 0000000000000020  RBX: 0000000000000008  RCX: 0000000000000001         RDX: 0000000000000000  RSI: ffff880211261fd8  RDI: ffffffff81c12f00         RBP: ffff880211261e98   R8: 00000000fffffffc   R9: 0000000000000f9f         R10: 0000000000001e95  R11: 0000000000000000  R12: 0000000000000003         R13: ffff88021ed5ac70  R14: 0000000000000020  R15: 12d818fb42cfe42b         ORIG_RAX: ffffffffffffffff  CS: 0010  SS: 0018     --- <MCE exception stack> ---      #9 [ffff880211261e38] intel_idle at ffffffff8136d48f     #10 [ffff880211261ea0] cpuidle_idle_call at ffffffff815082d1     #11 [ffff880211261f00] cpu_idle at ffffffff8101322a      Any ideas?


Running make with vermagic kernel string with parentheses causes /bin/sh syntax error

I am on Ubuntu Server 12.04 x86_64 and I need to build Android CyanogenMod 7.2 kernel module. My phone has custom ROM and a patched kernel:               adb shell cat /proc/version      yields               Linux version 2.6.37.3-cyanogenmod-gf3345ef-dirty (subbotin@avs234) (gcc version 4.4.0 (GCC) ) #2 PREEMPT Sun Mar 13 14:55:50 MSK 2011      I have this variable setup in addition to toolchain variables etc.               export LOCALVERSION="-cyanogenmod-gf3345ef-dirty (subbotin@avs234)"      When I run `make` ( ~~note that on Ubuntu`bash` is `dash`~~) I get the following:               CHK    include/linux/version.h     /bin/sh: 1: Syntax error: "(" unexpected (expecting ")")     make: ***[include/generated/utsrelease.h] Error 2      However, if I remove "(subbotin@avs234)" the kernel compiles just fine. I need a full vermagic string since I suspect that this kernel module wouldn't load because of difference in the version string. What is the problem with parentheses? A more detailed description: The device is HTC Desire (bravo) GSM and the application is EDS Lite (http://play.google.com/store/apps/details?id=com.sovworks.edslite). I partially followed this http://oldwiki.cyanogenmod.org/wiki/Building_Kernel_from_source and this is a kernel module compilation guide http://www.sovworks.com/details.html#compileModule. In the latter link it is mentioned that vermagic string should probably match completely. When I try to load this module from the application mount menu I get 'failed loading kernel module'               #get repo tool     mkdir -p ~/bin      curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo      chmod a+x ~/bin/repo           #clone repo for cm-kernel     mkdir -p ~/Android/kernel      cd ~/Android/kernel      git clone git://github.com/CyanogenMod/cm-kernel.git      cd cm-kernel          #pull the kernel configuration from the device     #my config file is here: http://pastebin.com/aHA2mETG     adb pull /proc/config.gz ~/Android/kernel/cm-kernel     cd ~/Android/kernel/cm-kernel     gunzip config.gz     #replace CONFIG_LOCALVERSION and CONFIG_LOCALVERSION_AUTO with null string     sed 's/CONFIG_LOCALVERSION\([[:alnum:][:punct:]]\)*//' config > .config     cp config .config          #toolchain from http://developer.android.com/sdk/index.html#download (sdk tools)          export CROSS_COMPILE=~/Android/Toolchain/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-     export CCOMPILER=~/Android/Toolchain/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-     export ARCH=arm     export SUBARCH=arm     export LOCALVERSION="-cyanogenmod-gf3345ef-dirty (subbotin@avs234)"     make oldconfig          #Answer "no" CONFIG_LOCALVERSION_AUTO (the second prompt) request.     make          #download EDS kernel module src http://www.sovworks.com/downloads.html     #extract to ~/Android/km     cd ~/km     make -C ~/Android/kernel/cm-kernel\      ARCH=arm CROSS_COMPILE=~/Android/Toolchain/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-\      EXTRA_CFLAGS=-fno-pic\      SUBDIRS=~/Android/km modules          #if LOCALVERSION="-cyanogenmod-gf3345ef-dirty" then vermagic string is as in the following     modinfo eds.ko     #...     vermagic:       2.6.37.6-cyanogenmod-gf3345ef-dirty preempt mod_unload ARMv7       upd: just noticed that the stable version of currently installed kernel (which is 3) is not equal to the built kernel stable version (6). Not sure if they are compatible - maybe the problem is with installed kernel version string after all?


TPM passwordless boot

I'm trying to create device with CentOS6, encrypted disk (with LUKS), TPM module and TrustedGRUB to boot securely and without interaction. I'm following instructions from https://github.com/shpedoikal/tpm-luks but i'm still being asked for password (now to access to TPM module's NV memory. That makes the whole thing pointless. Am i doing something wrong or it's that way by design? I've altered tpm-luks scripts to change NV read/write permissions (to PPREAD|PPWRITE) but it (obviously) didn't help. I cannot find any clue on the Internet. TPM is very new thing to me, so i'm maybe looking in wrong direction, so any help will be appreciated.


Extend sda3 partition in openSUSE?

I would like to extend the `sda3` partition in openSUSE 11.1 running on VMware. My `df -h` has the following output:               Filesystem            Size  Used Avail Use% Mounted on     /dev/sda2             7.5G  5.0G  2.2G  70% /     udev                 1001M  180K 1001M   1% /dev     /dev/sda3              11G  9.7G   50M 100% /home     .host:/               298G  247G   52G  83% /mnt/hgfs     /dev/sr0              134M  134M     0 100% /media/GParted-live      My `fdisk -l` output               Disk /dev/sda: 37.5 GB, 37580963840 bytes     255 heads, 63 sectors/track, 4568 cylinders     Units = cylinders of 16065 * 512 = 8225280 bytes     Disk identifier: 0x000b37e7           Device Boot      Start         End      Blocks   Id  System     /dev/sda1               1         262     2104483+  82  Linux swap / Solaris     /dev/sda2   *         263        1252     7952175   83  Linux     /dev/sda3            1253        2610    10908135   83  Linux     /dev/sda4            2611        4568    15727635   83  Linux      I already extended the drive in VMware and created an empty `/dev/sda4` partition, now how can I extend `/dev/sda3` to use the 15 additional GBs from the `/dev/sda4` partition?


Change threaded inbox view in Thunderbird so that subject lines are the most recent subject in the thread

Currently, when using Thunderbird in threaded view, the subject line for each thread is the subject of the original, root email. I would like to change this so that it is the subject of the most recent email. For example, the following thread               *- Original subject     |--> Re: Original subject     |---> New subject     |----> Re: New subject      when collapsed displays in the inbox as               *- Original subject      whereas I would like it to display as               *- Re: New subject      Despite my best efforts, I cannot find how to change this. Is it possible without editing the source and compiling my own version?


How to overcome TZ difference on different servers?

We have a few servers in different timezones. We have a table.html that contains dates. We want to have correct dates in each server, so we thought that:               - we should convert the time on server "A" to unix time.      - then on server "B" back from unix time to normal time.       **Q:** So, how can we convert between normal dates<->unix time (so edit the table.html in-place? ) server "A":               cat table.html
X	X	X	X	X	X	2014-05-23-12.23.00.000000

X	X	X	X	X	X	2014-05-26-17.00.00.000000

X	X	X	X	X	X	NA
      server "B":               cat table.html
X	X	X	X	X	X	1400840580

X	X	X	X	X	X	1401116400

X	X	X	X	X	X	NA
      p.s.: the servers doesn't have the "-d" parameter of the "date" command! maybe perl?   p.s.2: the "X" is censored data, could be anything..   p.s.3: sometimes there isn't any date in the 7th column, then "NA" is written   UPDATE: I tried out an answer:               $ cat a.txt
X	X	X	X	X	X	2014-05-23-12.23.00.000000

X	X	X	X	X	X	2014-05-26-17.00.00.000000

X	X	X	X	X	X	NA
     $      $ cat b.txt      #!/usr/bin/env perl     use warnings;     use POSIX;     # Pass the option -i to import from unix time to local time.     # Without the option, export from local time to unix time.     $import = 0;     if (@ARGV && $ARGV[1] eq "-i") {$import = 1}     while (<STDIN>) {         @F = split m!(.*	)!;         # Field 13 contains a potential date.         if ($import && $F[13] =~ m!()([0-9]+)(\.[0-9]*	)!) {         # Import unix time to local time         ($s,$n,$h,$d,$m,$y,@_tail) = localtime($2);         $F[13] = sprintf "$1%04d-%02d-%02d-$02d.%02d.%02d$3", $y, $m, $d, $h, $n, $s;         }         if (!$import && $F[13] =~ m!()([0-9]+)-([0-9]+)-([0-9]+)-([0-9]+)\.([0-9]+)\.([0-9]+)(\.[0-9]*	)!) {         # Export local time to unix time         $t = POSIX.mktime($7, $6, $5, $4, $3, $2);         $F[13] = "$1$t$8";         }         $_ = "@F";     }     $      $      $ perl b.txt a.txt      Use of uninitialized value $ARGV[1] in string eq at b.txt line 7.          Use of uninitialized value $F[13] in pattern match (m//) at b.txt line 16, <STDIN> line 1.          Use of uninitialized value $F[13] in pattern match (m//) at b.txt line 16, <STDIN> line 2.          Use of uninitialized value $F[13] in pattern match (m//) at b.txt line 16, <STDIN> line 3.     ^C     $