title: Why doesn't my command work when aliased?

text: I use `ps -ef | grep catalina | grep -v grep` to print the tomcat process running on the system:               kshitiz   7099     1  0 May11 ?        00:02:29 /usr/lib/jvm/jdk1.8.0/bin/java -agentlib:jdwp=transport=dt_socket,suspend=y,address=localhost:38156 -Dcatalina.base=/home/kshitiz/Documents/workspaces/ggts/.metadata/.plugins/org.eclipse.wst.server.core/tmp1 -Dcatalina.home=/opt/tomcat-7.0.42 -Dwtp.deploy=/home/kshitiz/Documents/workspaces/ggts/.metadata/.plugins/org.eclipse.wst.server.core/tmp1/wtpwebapps -Djava.endorsed.dirs=/opt/tomcat-7.0.42/endorsed -Dfile.encoding=UTF-8 -classpath /opt/tomcat-7.0.42/bin/bootstrap.jar:/opt/tomcat-7.0.42/bin/tomcat-juli.jar:/usr/lib/jvm/jdk1.8.0/lib/tools.jar org.apache.catalina.startup.Bootstrap start      Then I use `ps -ef | grep catalina | grep -v grep | awk -F' ' '{print $2}'` to extract the process id:               7099      But when I alias the whole command `alias tomcat_id="ps -ef | grep catalina | grep -v grep | awk -F' ' '{print $2}'"` and use it via alias, it prints the whole text and `awk` doesn't seem to work. `type tomcat_id` gives:               tomcat_id is aliased to `ps -ef | grep catalina | grep -v grep | awk -F' ' '{print }''


title: Trying to SSH into my Android phone, but connection closed

text: I am trying to use the ssh/sftp Daemon app on Android, and SSHing into the phone using an openssh client. Here is the verbose output I get right before the connection breaks               debug1: Authentication succeeded (password).     Authenticated to 10.0.0.9 ([10.0.0.9]:22).     debug1: channel 0: new [client-session]     debug1: Entering interactive session.     debug1: Sending environment.     debug1: Sending env LANG = en_US.UTF-8     debug1: client_input_channel_req: channel 0 rtype exit-signal reply 0     debug1: channel 0: free: client-session, nchannels 1     Connection to 10.0.0.9 closed.     Transferred: sent 3064, received 1088 bytes, in 0.2 seconds     Bytes per second: sent 19445.0, received 6904.7     debug1: Exit status -1      Anyone have any idea what the above output means, and if so, whether there's anything I can do client-side to fix this?


title: How to Install Broadcom Corporation BCM4312 Driver onto Linux Mint

text: I had just recently downloaded Linux Mint onto my computer, and I downloaded a 64-bit driver for wireless, but I don't know how to install it. I've never used linux before now, and the person who downloaded the software already left for vacation. I understand the concept of opening a terminal and writing commands, from previous forums, but none of what I try seems to work. I wrote _/home/uname -r~/Desktop/broadcom-wl-4.80.53.0 2/kmod_ and I get a reply saying _bash: /home/uname -r~/Desktop/broadcom-wl-4.80.53.0 2/kmod: No such file or directory_. But the file is on the desktop. I continued with writing _/home/uname -r~/Desktop/broadcom-wl-4.80.53.0 2/kmod_ which results in a reply saying _sudo: b43cutter: command not found_. Another forum told me to go to: _System->Administrator->Additional Drivers(Hardware drivers)_. The only 'system' I have is: System Log, System Monitor, System Settings. I'm not sure what to do. All the forums are confusing, and I'm new to this.


title: How to add a key binding to maximize/close all windows?

text: Lubuntu uses LXDE with Openbox. I can configure key bindings in `~/.config/openbox/lubuntu-rc.xml` I want to add key bindings to maximize all windows and have the current active one on top. I also need to have a key binding to close all windows. **Example**               <keybind key="KP_Prior">       <action name="Execute">         <startupnotify>           <enabled>true</enabled>           <name>File manager</name>         </startupnotify>         <command>lxsession-default file_manager</command>       </action>     </keybind>


title: Changelog of deb package

text: I'm using `dpkg -b` to build packages with python scripts. (DEBIAN format). In the DEBIAN folder I'have added the following files:               compat     control     copyright     changelog      The changelog is using the right format.               7zrecover (1.0-1) UNRELEASED; urgency=low            * Initial release. (Closes: #XXXXXX)           -- Lars Wirzenius <liw@liw.fi>  Thu, 18 Nov 2010 17:25:32 +0000      When I install the package, and I try to display the changelog, I always get               This change is not coming from a source that supports changelogs.          Failed to fetch the changelog for 7zrecover     URI was: http:/// . changelog      (the URI is .///. Changelog, the site does not let me post it right) "This change is not coming from a source that supports changelogs." is there anyway to fix this? I was thinking in redirect the source to the computer, and putting a changelog at /usr/share/doc/7zrecover/


title: Reading a filesystem from a whole disk image

text: I ran these commands:               VBoxManage clonehd d6b9f0a5-98df-48ca-83c8-91a0809ec349 --format RAW Debian.raw     sudo dd if=~/.VirtualBox/HardDisks/Debian.raw of=/dev/sda5      When I try to mount the partition, I get this complaint:               EXT4-fs (sda5): VFS: Can't find ext4 filesystem      Now I know that the VM had an ext4 partition. What did I do wrong?


title: Mounting Disk Image in Raw format

text: While Trying to mount a disk image in Raw(dd) format using the following command               mount  nps-2010-emails.dd /media/manu/      I get the following error message               mount: you must specify the filesystem type      I know that using -t we can specify the file system but what is the terminology for a RAW (dd) file, which can pe passed as an argument to the mount command. If my method to mount this file system is wrong please help me out in doing the same. On typing the command **file -s nps-2010-emails.dd** The output is as follows: **nps-2010-emails.dd: x86 boot sector; partition 1: ID=0xb, starthead 254, startsector 1, 20479 sectors, extended partition table (last)\011, code offset 0x0**


title: What's meaning the of a pair of parentheses after a string literal?

text: I accidentally input the the following command into the Bash terminal:               exit()      And the Bash keeps read the next line until I input a string literal and Bash gives the error of "-bash: syntax error near unexpected token". So I test some other similar inputs like:               foobar ()      The Bash gives the similar output. The following is the result I got:               ~ $ foo ()     > bar     -bash: syntax error near unexpected token `bar'      Can someone explain why. I only know the parentheses are used to create arrays or subshell. I don't know what this one actually does.


title: MySQL Backup folder permissions - Non downloadable by others

text: I created a PHP script which takes backup of the mysql database every day and then saves it to a folder called "BkPath". All the backups will be saved here. But am trying learn the `chmod` command to change permission of this folder. I know a bit about `read, write and execute`. But it isn't enough. I want to change its permission with `chmod` so that only i can access this folder that means view the files inside the folder , change them and also download them. But i don't want anyone else to view these files, change or download them. What will the correct `chmod` command for me? Note: I want to make this folder non accessible and downloadable by others over the internet.


title: Does `sed` exist in all *nixes?

text: My application will be running on all versions of Unix-based OS, say, Linux, MacOS, HP-UX, Sun Solaris , OSX, etc. I'm using the following `sed` command in a common place to delete the string matched in a text file:               sed -i '/string1/d' mytextfile      Will this work in all *nixes?


title: Anyway to read NFS vhdx from Hyper-V under Windows?

text: Quick of it is: I have an Ubuntu 12.10 server instance, running under Hyper-V on Win 8. It has worked wonderfully for about 4 months. Now, when I need to pull data back to Windows, inexplicably, it refuses to mount the swap drive, and will not acquire an IPv4 address from my local router. Even though the system boots, and I can connect to it via the Hyper-V console, I cannot transfer data via scp, for instance. Also, connects via ssh also fail (e.g. hostname is unknown). My question is: is there a way to get Win8 to be able to recognize and read NFS from VHDXs? Apologies: want to add tags "Hyper-V" and "Windows 8".


title: How to prevent wpa_supplicant from connecting to a network

text: How can I persistently prevent a wireless interface using `wpa_supplicant` in roaming mode from connecting to a particular open network `foo`? This doesn't work:               $ sudo wpa_cli     > blacklist 00:11:22:33:44:55     FAIL      Nor does the following: ### /etc/network/interfaces:               allow-hotplug wlan0     iface wlan0 inet manual       wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf      ### wpa_supplicant.conf:               network={      ssid="foo"      key_mgmt=NONE      priority=0     }


title: What are the interface prefix meanings in ifconfig?

text: I'm not sure if these have a name, but on most computers I use the interface prefixes are usually:   * eth- : Ethernet/Wired   * wlan- : Wireless/WiFi However, on my ASUS RT-N56U, I have the following:   * br0 : 'Ethernet' - Bridge?   * eth2 : 'Ethernet', IPv6 (where are 0 and 1?)   * eth3 : 'Ethernet', IPv4 (the one with my WAN IP)   * lo : 'Local Loopback' - What's this for?   * ra0 : 'Ethernet' - ?   * rai0 : 'Ethernet' - ? Are there others? What do they mean?


title: quick filter of IP that's causing sendmail DOS under FreeBSD

text: I've got what appears to be a malicious/spam host that is overloading my Sendmail server causing it to refuse connections to other hosts. I'm overloaded by connections from one particular IP address. This IP is blocked in /etc/access from us accepting mail but it's causing a DOS via the mail server which is limiting the number of simultaneous connections. How can I block a particular IP address so it doesn't even get to sendmail? I can't use inetd because sendmail is operating as a daemon. Can I use something like ifpw? I've never used it before. This is FreeBSD 7.0 Any help would be greatly appreciated!


title: Replacing xfce with awesome in Xubuntu

text: I'm using Xubuntu 13.04 with xfce 4.10. I'm trying to entirely replace xfce 4.10 (not uninstall, but replace) with awesome. So far, I have yet to even get awesome to run. The steps that I have tried thus far:   1. Install awesome with `sudo apt-get install awesome`   2. ~/.xinitrc now just contains `exec awesome`.   3. `mkdir ~/.config/awesome/` and `cp /etc/xdg/awesome/rc.lua ~/.config/awesome/` I've tried restarting, I've tried just running awesome (I get `E: awesome: main:445: another window manager is already running`, which is expected, but I'd really like to start up my session in awesome, not have to manually quit xfce and then start awesome). What am I missing?


title: How to flash a router from FreeWRT to OpenWrt?

text: How can I change the firmware on a router from FreeWRT to OpenWrt? The router is a Linksys WRT54GL, so it should have enough memory for OpenWrt and I have SSH connection as root to the system.


title: No CD-Rom on IBM 9228 with 631xESB/632xESB IDE Controller

text: I've got an IBM 9228 Server running Gentoo Linux. Everything works except for the CD-ROM drive, which is connected via a PATA cable/controller. I know the CD-ROM works and is connected correctly because I can boot from it. However with my current kernel, I can't see /dev/sr*. If I do an lshw, I see my controllers here:                   *-ide UNCLAIMED              description: IDE interface              product: 631xESB/632xESB IDE Controller              vendor: Intel Corporation              physical id: 1f.1              bus info: pci@0000:00:1f.1              version: 09              width: 32 bits              clock: 33MHz              capabilities: ide bus_master              configuration: latency=0              resources: ioport:18a0(size=8) ioport:1894(size=4) ioport:1898(size=8) ioport:1890(size=4) ioport:1880(size=16)         *-storage              description: SATA controller              product: 631xESB/632xESB SATA AHCI Controller              vendor: Intel Corporation              physical id: 1f.2              bus info: pci@0000:00:1f.2              version: 09              width: 32 bits              clock: 66MHz              capabilities: storage pm ahci_1.0 bus_master cap_list              configuration: driver=ahci latency=0              resources: irq:17 ioport:18b8(size=8) ioport:18ac(size=4) ioport:18b0(size=8) ioport:18a8(size=4) ioport:18c0(size=32) memory:f0504400-f05047ff      In the PATA section of my kernel configuration I have the following:               CONFIG_PATA_MPIIX=y      According to other posts I've found, this should be the correct option for the 631/2xESB, but as you can see above, it's UNCLAIMED and I can't find my CD device anywhere in /dev. What configuration setting needs to be enabled for my CD/DVD device to show up?


title: Applications for annotating djvu?

text: For pdf files, I use Xournal to add comments, draw underlines and highlight texts in pdf files. I wonder what applications I can use to annotate djvu files? My OS is Ubuntu. Thanks!


title: How to use casper-rw file for persistance

text: I have my USB stick setup using Easy2Boot. It allows me to drop ISO files onto the USB drive and boot from there no config or tweaking needed. I have been doing research on making it persistent. I have found that you can use a file or a partition called casper-rw. It has info on how to use the file, but my question is. Can you have the casper-rw file directly in the root of the bootable ISO or does it need to go into a special folder on the ISO? For that matter can I even have the file in the ISO or do I need to have it directly on the USB drive?


title: linux mint booting to black screen

text: I was installing virtualbox and lost the ability to open new terminal windows. Thinking it would fix itself I restarted after I got virtualbox installed. Now I am booting to a blank screen. Hitting esc reveals it stops after "stopping startpar bridge for Notification of upstart job start/stop" which has the status of ok. I can access other TTY, and startx will bring the gui up if I sudo, if I don't it will tell me there is a timeout in locking .Xauthorizatuon in the my home directory.


title: ssh ControlMaster exceptions

text: Most ssh connections I make benefit from the ControlMaster being turned on, for example most of the connections I make over VPN. However, there are a few that don't, such as github. So I've got the following in my ~/.ssh/config file:               Host *       ControlMaster auto       ControlPath   ~/.ssh/%r,%h,%p       ControlPersist 30m          Host github.com       ControlMaster no       ControlPath none       ControlPersist no      (Among other such exceptions) However, from what I can tell (pgrep -fla mux), the mux process is still being created, and this seems to provide some minor annoyances for the connections that don't benefit from muxing. Is there some way to specify, on a host-by-host basis, in my config file, not to create the master connection?


title: tmux blocks certain things on my Mac

text: 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.


title: Mint keyboard mappings ignored

text: 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.


title: Xmonad.hs adding scratchpad, Not in scope error

text: 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.


title: How can I round all numbers in a file?

text: 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.


title: Install Ubuntu's font in other OSes?

text: 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?


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

text: 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?


title: /proc/PID/fd/X link number

text: 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?


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

text: 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?


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

text: 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.


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

text: 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!


title: Ossim Server email alert

text: 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 ?


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

text: 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?


title: Perl Script Explanation

text: #!/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.


title: Unable to unregister vms

text: 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?


title: How to install C++ compiler for Eclipse

text: 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.


title: find + grep to match exact keywords in a file

text: 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 {} \;


title: Reconfigure login through root ftp (lost ssh access)

text: 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.


title: CentOS Live CD won't install server

text: 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!


title: per process swapiness for linux

text: `/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`


title: Problem pinging from a specific interface

text: 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?


title: ntp cannot open shared object file: Permission denied

text: 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


title: Flash plugin installation error

text: 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. :)


title: Resize non-LVM ext4 root partition

text: 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.


title: Comparing two strings in Bash

text: 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?


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

text: 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.


title: How to avoid overflowing the kernel printk ring buffer?

text: 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?


title: How to set up ZFS with ZIL and L2ARC SSD?

text: 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?


title: Hardlinks in Dropbox not updated

text: 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.


title: Get device node by major/minor numbers pair

text: 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.


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

text: 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?


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

text: 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.


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

text: 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.


title: How can force my screen to unblank?

text: 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.


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

text: 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?


title: Auto-switch to wifi

text: 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.


title: Copy only Specific text of a file to another

text: 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


title: Nested lists in man page

text: 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`.


title: set baud speed for tty

text: 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?


title: /usr/bin/ld: cannot find -lfl

text: 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?


title: Help fix corrupt GRUB

text: 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?


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

text: 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.


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

text: 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.


title: Cancelling execution of daemons during boot

text: 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.


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

text: 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.


title: What is the best rtorrent.rc config for seeding?

text: 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?)


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

text: 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?


title: Install pdflatex via SSH on Amazon EC2 instance

text: 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?


title: apache ldap authentication taking far too long

text: 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).


title: GIT push only commits older than x months

text: 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?


title: Partclone error

text: 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).


title: What package is necessary to install for the getacl command?

text: 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?


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

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


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

text: 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?


title: How to set a new password from bash?

text: 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.


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

text: 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.


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

text: 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?


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

text: 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 ?


title: What is a "recursive DNS query"?

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


title: Character count in Unix wc command

text: 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


title: Keep screen ratio while maximizing mplayer

text: 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?


title: Issues while untaring tarball with acl

text: 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`


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

text: 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?


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

text: 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


title: Unable to open EPS files

text: 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)


title: rpd over https using a linux client

text: 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.


title: Gnome menu panel blank space

text: 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 :)


title: bash script [ x$1 = x ]

text: 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?


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

text: 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.


title: Does Fedora 16 do automatic system updates?

text: 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?


title: Bluejeans on Linux 32

text: 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


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

text: 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!


title: Disable mounting to `$HOME/.gvfs`

text: 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?


title: How to bzip a file with minimum cpu percentage?

text: 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.


title: Is Perl obsolete?

text: 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.


title: What are some enterprise level linux distributions

text: 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).


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

text: 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"?


title: Two monitors: intel VGA + Nvidia DVI

text: 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?


title: How can I make mailx inform me of new mail?

text: 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.)


title: Debian 7.5 & Supermicro A1SAM-2750F

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


title: GNOME Login Theme Downloads (Mint 16 Petra)

text: 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?


title: How to handle bounce mail sent to the VERP address

text: 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.


title: Guest OS Ubuntu 12.04 no network connection

text: 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?


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

text: 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?


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

text: 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?


title: How to start racoon VPN IKE negotiation automatically?

text: 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.


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

text: 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?


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

text: 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?


title: Mysql import the most recent file from a directory

text: 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.


title: Backing up and restoring a system user account

text: 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._


title: Tmux xclip copy no longer working

text: 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.


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

text: 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?


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

text: 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.


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

text: 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)?


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

text: 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.


title: difference between windows local admin and unix root

text: 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?


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

text: 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.


title: Alternative to xxd for QNX

text: 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.


title: Default printer in KDE 4 printer dialogs

text: 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.


title: finger and who commands usage

text: 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?


title: Where do file managers save their bookmarks?

text: 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.


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

text: 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?


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

text: 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?