title: Xorg freeze with external monitor on Intel Mobile GM965/GL960 ( Debian linux )

text: I have as issue with my ASUS X80L laptop ( system config: Celeron M 550, 2Gb RAM, Intel Mobile GM965/GL960 video ). I'm running Debian testing on it with X.Org v 1.12.1.902 and XFce 4.8. Every 10-20 minutes my X-server is freeze for 20-60 seconds w/o any reason ( usually I'm using only IDE and opera browser for web-dev ). During freeze-time I can only move cursor and hear music on background. Watching my `/var/log/Xorg.0.log` on a tty1 I see repeated entries (it repeats every time while X is not respond):               (II) AIGLX: Suspending AIGLX clients for VT switch     (II) Open ACPI successful (/var/run/acpid.socket)     (II) AIGLX: Resuming AIGLX clients after VT switch     (II) intel(0): EDID vendor "GSM", prod id 17503     (II) intel(0): Using hsync ranges from config file     (II) intel(0): Using vrefresh ranges from config file     (II) intel(0): Printing DDC gathered Modelines:     (II) intel(0): Modeline "1280x1024"x0.0  108.00  1280 1328 1440 1688  1024 1025 1028 1066 +hsync +vsync (64.0 kHz eP)     (II) intel(0): Modeline "800x600"x0.0   40.00  800 840 968 1056  600 601 605 628 +hsync +vsync (37.9 kHz e)     (II) intel(0): Modeline "640x480"x0.0   31.50  640 656 720 840  480 481 484 500 -hsync -vsync (37.5 kHz e)     (II) intel(0): Modeline "640x480"x0.0   25.18  640 656 752 800  480 490 492 525 -hsync -vsync (31.5 kHz e)     (II) intel(0): Modeline "720x400"x0.0   28.32  720 738 846 900  400 412 414 449 -hsync +vsync (31.5 kHz e)     (II) intel(0): Modeline "1280x1024"x0.0  135.00  1280 1296 1440 1688  1024 1025 1028 1066 +hsync +vsync (80.0 kHz e)     (II) intel(0): Modeline "1024x768"x0.0   78.75  1024 1040 1136 1312  768 769 772 800 +hsync +vsync (60.0 kHz e)     (II) intel(0): Modeline "1024x768"x0.0   65.00  1024 1048 1184 1344  768 771 777 806 -hsync -vsync (48.4 kHz e)     (II) intel(0): Modeline "832x624"x0.0   57.28  832 864 928 1152  624 625 628 667 -hsync -vsync (49.7 kHz e)     (II) intel(0): Modeline "800x600"x0.0   49.50  800 816 896 1056  600 601 604 625 +hsync +vsync (46.9 kHz e)     (II) intel(0): Modeline "1152x864"x0.0  108.00  1152 1216 1344 1600  864 865 868 900 +hsync +vsync (67.5 kHz e)     (--) synaptics: SynPS/2 Synaptics TouchPad: touchpad found      Full log http://pastebin.com/raw.php?i=92JXreRW Output of `lspci -v` http://pastebin.com/raw.php?i=QXWqsxZu Xorg.conf               Section "ServerLayout"         Identifier     "Layout0"         Screen      0  "Screen0"         InputDevice    "Keyboard0" "CoreKeyboard"     EndSection          Section "InputDevice"         # generated from default         Identifier     "Keyboard0"         Driver         "kbd"         Option         "XkbLayout" "us,uk(winkeys)"         Option         "XkbOptions" "grp:alt_caps_toggle,grp_led:scroll"     EndSection          Section "Monitor"         Identifier     "Monitor0"         VendorName     "LG"         ModelName      "L1752HR"         Option         "DPMS" "false"              Modeline       "1280x800x0.0"   69.30  1280 1328 1360 1405  800 803 809 822 -hsync -vsync     EndSection          Section "Device"         Identifier     "Device0"         Driver         "intel"              VideoRam       524288     EndSection          Section "Screen"         Identifier     "Screen0"         Device         "Device0"         Monitor        "Monitor0"         DefaultDepth    24              SubSection     "Display"             Depth       24         EndSubSection     EndSection      I can't solve this issue by using google and forums. What's wrong? **upd.** I'm performed test using laptop w/o external display, but I'm still get save freezes and errors. Here is dmesg output http://pastebin.com/raw.php?i=xf9B1jgh Also, every time after that freezes my keyboard setting fall back to default, defined in `xorg.conf`. My xfce4 setting defines locales chagne by alt+caps, and left-alt as a compose-key. But it turn alt+shift to change locale, with no compose key. **upd 2** After changing my `xorg.conf` by adding some optioons regarding EDID               Option "UseEDID" "False"     Option "IgnoreEDID" "1"      There are no more error message in dmesg, but sometimes X-server freeze for the time (now for shorter time). And I've got some messages in my `Xorg.0.log`               [157600.245] (II) AIGLX: Suspending AIGLX clients for VT switch     [157605.263] (II) Open ACPI successful (/var/run/acpid.socket)     [157605.263] (II) AIGLX: Resuming AIGLX clients after VT switch     [157605.409] (II) intel(0): EDID vendor "LPL", prod id 297     [157605.409] (II) intel(0): Printing DDC gathered Modelines:     [157605.409] (II) intel(0): Modeline "1280x800"x0.0   69.30  1280 1328 1360 1405  800 803 809 822 -hsync -vsync (49.3 kHz eP)     [157605.810] (--) synaptics: SynPS/2 Synaptics TouchPad: touchpad found


title: How to properly prepare a server for power outages?

text: I have a personal Debian server set up, that I'm able to access in person and remotely, but normally I'm away from it and it's remote. It's on a battery- backup surge protector, but sometimes that isn't enough to keep the server on through a power outage. The machine automatically starts and boots, but its left at the login screen (in person). What I want to know is, what is the best way to have the server get itself back on and online after it loses power, without leaving it vulnerable in person? I'd like it to not auto-login for the screen in person, so that the machine isn't overly vulnerable in-person while I'm away. Are there battery backups that signal for hibernation or other safe power down automatically? How can I have a user sign in automatically in the background? What would you recommend as a "best practice" for this, considering it's just a home server?


title: How do I configure multiple monitors to work with dwm's tag rules?

text: I have a laptop with an external monitor and I want to use the external monitor as the primary one. I'm also running Debian with dwm. `xrandr -q` gives me this:               Screen 0: minimum 320 x 200, current 3286 x 1080, maximum 8192 x 8192     LVDS1 connected 1366x768+1920+0 (normal left inverted right x axis y axis) 345mm x 194mm        1366x768       60.0*+   50.0     VGA1 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 509mm x 286mm        1920x1080      60.0*+      (I omitted some of the other resolutions for brevity). My dwm config.h file has several tag rules like this:               static const Rule rules[] = {         /* xprop(1):          *  WM_CLASS(STRING) = instance, class          *  WM_NAME(STRING) = title          */         /* class      instance    title       tags mask     isfloating   monitor */         { "Chromium",    NULL,   NULL,       1,            False,       -1 },         { "xxxterm",     NULL,   NULL,       1,            False,       -1 },         { "Surf",        NULL,   NULL,       1,            False,       -1 },         { "Iceweasel",   NULL,   NULL,       1 << 1,       False,       -1 },         { "Vlc",         NULL,   NULL,       1 << 3,       False,       -1 },     };      and I have this xrandr command in my ~/.xinitrc file that configures the monitors properly when I run `startx`:               xrandr --output VGA1 --auto --output LVDS1 --auto --right-of VGA1      I want my tag rules to apply whenever I open a program, and for that program to be automatically assigned to whichever monitor has focus. I found a reddit post that said that -1 would do this, but for any program that has a tag rule, they always open on my laptop (LVDS1), not the external monitor (VGA1). For programs that don't have a tag rule, e.g. st, they will open on whichever monitor/tag has focus. I tried changing the monitor value to 0 or 1, rebuilding dwm and restarting X, and the result is the same. How do I configure dwm so that programs with tag rules open in their respective tag on whichever monitor has focus? * * * My full `config.h`:               /* appearance */     static const char font[]            = "-*-terminus-medium-r-*-*-16-*-*-*-*-*-*-*";     static const char normbordercolor[] = "#333333";     static const char normbgcolor[]     = "#101010";     static const char normfgcolor[]     = "#999999";     static const char selbordercolor[]  = "#224488";     static const char selbgcolor[]      = "#224488";     static const char selfgcolor[]      = "#ffffff";     static const unsigned int borderpx  = 1;        /* border pixel of windows */     static const unsigned int snap      = 32;       /* snap pixel */     static const unsigned int minwsz    = 20;       /* Minimal heigt of a client */     static const Bool showbar           = True;     /* False means no bar */     static const Bool topbar            = True;     /* False means bottom bar */     static const Bool viewontag         = False;    /* Switch view on tag switch */     static const Bool extrabar          = True;     /* False means no extra bar */          /* tagging */     static const char *tags[] = {"1", "2", "3", "4", "5", "6", "7", "8", "9" };          static const Rule rules[] = {         /* xprop(1):          *  WM_CLASS(STRING) = instance, class          *  WM_NAME(STRING) = title          */         /* class      instance    title       tags mask     isfloating   monitor */         { "Chromium",    NULL,   NULL,       1,            False,       -1 },         { "xxxterm",     NULL,   NULL,       1,            False,       -1 },         { "Surf",        NULL,   NULL,       1,            False,       -1 },         { "Iceweasel",   NULL,   NULL,       1 << 1,       False,       -1 },         { "Vlc",         NULL,   NULL,       1 << 3,       False,       -1 },         { NULL,          NULL,   "IPython",  1 << 4,       False,       -1 },         { "Eclipse",     NULL,   NULL,       1 << 4,       False,       -1 },         { "Quodlibet",   NULL,   NULL,       1 << 5,       False,       -1 },         { "Icedove",     NULL,   NULL,       1 << 6,       False,       -1 },         { "libreoffice", NULL,   NULL,       1 << 7,       False,       -1 },         { "Gnumeric",    NULL,   NULL,       1 << 7,       False,       -1 },         { "Abiword",     NULL,   NULL,       1 << 7,       False,       -1 },         { "Keepassx",    NULL,   NULL,       1 << 8,       False,       -1 },     };          /* layout(s) */     static const float mfact      = 0.50; /* factor of master area size [0.05..0.95] */     static const float smfact     = 0.00; /* factor of tiled clients [0.00..0.95] */     static const int nmaster      = 1;    /* number of clients in master area */     static const Bool resizehints = False; /* True means respect size hints in tiled resizals */          #include "patchlibs/bstack.c"     #include "patchlibs/bstackhoriz.c"     #include "patchlibs/fibonacci.c"     #include "patchlibs/gaplessgrid.c"     #include "patchlibs/tcl.c"     static const Layout layouts[] = {         /* symbol     arrange function */         { "T",      tile },    /* first entry is default */         { "F",      NULL },    /* no layout function means floating behavior */         { "B",      bstack },         { "G",      gaplessgrid },         { "M",      monocle },         { "H",      bstackhoriz },         { "C",      tcl },         { "S",      spiral },         { "D",      dwindle },     };          /* key definitions */     #define MODKEY Mod1Mask     #define WINKEY Mod4Mask     #define TAGKEYS(KEY,TAG) \         { MODKEY,                       KEY,      view,           {.ui = 1 << TAG} }, \         { MODKEY|ControlMask,           KEY,      toggleview,     {.ui = 1 << TAG} }, \         { MODKEY|ShiftMask,             KEY,      tag,            {.ui = 1 << TAG} }, \         { MODKEY|ControlMask|ShiftMask, KEY,      toggletag,      {.ui = 1 << TAG} },          /* helper for spawning shell commands in the pre dwm-5.0 fashion */     #define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } }          /* commands */     static char dmenumon[2] = "0"; /* component of dmenucmd, manipulated in spawn() */     static const char *dmenucmd[] = { "dmenu_run", "-m", dmenumon, "-fn", font, "-nb", normbgcolor, "-nf", normfgcolor, "-sb", selbgcolor, "-sf", selfgcolor, NULL };     static const char *termcmd[]  = { "st", NULL };     static const char *chromiumcmd[] = {"chromium-incognito", NULL};     static const char *icedovecmd[] = {"icedove", NULL};     static const char *xxxtermcmd[] = {"xxxterm", NULL};     static const char *musiccmd[] = {"quodlibet", NULL};     static const char *ipythoncmd[] = {"ipython3qt", NULL};     static const char *iceweaselcmd[] = {"iceweasel", NULL};     static const char *texteditcmd[] = {"scite", NULL};     static const char *lockcmd[] = {"lock", NULL};     static const char *videocmd[] = {"vlc", NULL};     static const char *screenshotcmd[] = {"screenshot", NULL};          #include "patchlibs/movestack.c"     static Key keys[] = {         /* modifier                     key        function        argument */         { WINKEY,                       XK_t,      spawn,          {.v = termcmd } },         { WINKEY,                       XK_c,      spawn,          {.v = chromiumcmd } },         { WINKEY,                       XK_d,      spawn,          {.v = icedovecmd } },         { WINKEY,                       XK_x,      spawn,          {.v = xxxtermcmd } },         { WINKEY,                       XK_i,      spawn,          {.v = iceweaselcmd } },         { WINKEY,                       XK_m,      spawn,          {.v = musiccmd } },         { WINKEY,                       XK_e,      spawn,          {.v = texteditcmd } },         { WINKEY,                       XK_p,      spawn,          {.v = ipythoncmd } },         { WINKEY,                       XK_l,      spawn,          {.v = lockcmd } },         { WINKEY,                       XK_v,      spawn,          {.v = videocmd } },         { WINKEY,                       XK_s,      spawn,          {.v = screenshotcmd } },         { MODKEY,                       XK_p,      spawn,          {.v = dmenucmd } },         { MODKEY,                       XK_b,      togglebar,      {0} },         { MODKEY,                       XK_b,      toggleextrabar,      {0} },         { MODKEY,                       XK_j,      focusstack,     {.i = +1 } },         { MODKEY,                       XK_k,      focusstack,     {.i = -1 } },         { MODKEY,                       XK_i,      incnmaster,     {.i = +1 } },         { MODKEY,                       XK_d,      incnmaster,     {.i = -1 } },         { MODKEY,                       XK_h,      setmfact,       {.f = -0.05} },         { MODKEY,                       XK_u,      setsmfact,      {.f = -0.05} },         { MODKEY,                       XK_m,      setsmfact,      {.f = +0.05} },         { MODKEY,                       XK_l,      setmfact,       {.f = +0.05} },         { MODKEY,                       XK_Return, zoom,           {0} },         { MODKEY,                       XK_Tab,    view,           {0} },         { MODKEY|ShiftMask,             XK_c,      killclient,     {0} },         { ControlMask|ShiftMask,        XK_t,      setlayout,      {.v = &layouts[0]} },         { ControlMask|ShiftMask,        XK_f,      setlayout,      {.v = &layouts[1]} },         { ControlMask|ShiftMask,        XK_b,      setlayout,      {.v = &layouts[2]} },         { ControlMask|ShiftMask,        XK_g,      setlayout,      {.v = &layouts[3]} },         { ControlMask|ShiftMask,        XK_m,      setlayout,      {.v = &layouts[4]} },         { ControlMask|ShiftMask,        XK_h,      setlayout,      {.v = &layouts[5]} },         { ControlMask|ShiftMask,        XK_c,      setlayout,      {.v = &layouts[6]} },         { ControlMask|ShiftMask,        XK_s,      setlayout,      {.v = &layouts[7]} },         { ControlMask|ShiftMask,        XK_d,      setlayout,      {.v = &layouts[8]} },         { ControlMask,                  XK_space,  setlayout,      {0} },         { MODKEY|ShiftMask,             XK_space,  togglefloating, {0} },         { MODKEY,                       XK_0,      view,           {.ui = ~0 } },         { MODKEY|ShiftMask,             XK_0,      tag,            {.ui = ~0 } },         { MODKEY,                       XK_comma,  focusmon,       {.i = -1 } },         { MODKEY,                       XK_period, focusmon,       {.i = +1 } },         { MODKEY|ShiftMask,             XK_comma,  tagmon,         {.i = -1 } },         { MODKEY|ShiftMask,             XK_period, tagmon,         {.i = +1 } },         { MODKEY|ShiftMask,             XK_j,      movestack,      {.i = +1 } },         { MODKEY|ShiftMask,             XK_k,      movestack,      {.i = -1 } },         TAGKEYS(                        XK_1,                      0)         TAGKEYS(                        XK_2,                      1)         TAGKEYS(                        XK_3,                      2)         TAGKEYS(                        XK_4,                      3)         TAGKEYS(                        XK_5,                      4)         TAGKEYS(                        XK_6,                      5)         TAGKEYS(                        XK_7,                      6)         TAGKEYS(                        XK_8,                      7)         TAGKEYS(                        XK_9,                      8)         { MODKEY|ShiftMask,             XK_q,      quit,           {0} },     };          /* button definitions */     /* click can be ClkLtSymbol, ClkStatusText, ClkWinTitle, ClkClientWin, or ClkRootWin */     static Button buttons[] = {         /* click                event mask      button          function        argument */         { ClkLtSymbol,          0,              Button1,        setlayout,      {0} },         { ClkLtSymbol,          0,              Button3,        setlayout,      {.v = &layouts[3]} },         { ClkWinTitle,          0,              Button2,        zoom,           {0} },         { ClkStatusText,        0,              Button2,        spawn,          {.v = termcmd } },         { ClkClientWin,         MODKEY,         Button1,        movemouse,      {0} },         { ClkClientWin,         MODKEY,         Button2,        togglefloating, {0} },         { ClkClientWin,         MODKEY,         Button3,        resizemouse,    {0} },         { ClkTagBar,            0,              Button1,        view,           {0} },         { ClkTagBar,            0,              Button3,        toggleview,     {0} },         { ClkTagBar,            MODKEY,         Button1,        tag,            {0} },         { ClkTagBar,            MODKEY,         Button3,        toggletag,      {0} },     };


title: Command to run a child process "offline" (no external network) on Linux

text: I have a program I would like to test in offline mode without taking down my actual network. This program would still need to connect to local sockets, including unix domain sockets and loopback. It also needs to _listen_ on loopback and be visible to other apps. But attempts to connect to a remote machine should fail. I'd like to have a utility that works like `strace`/`unshare`/`sudo` and simply runs a command with the Internet (and LAN) concealed and everything else still working: ` $ offline my-program-to-test ` This question has hints at the answer: Block network access of a process? There are a couple of suggestions there, such as run as another user then manipulate iptables, or `unshare -n`. But in both cases I don't know the incantation to get unix domain sockets and loopback to be shared with the main system - the answers to that question only tell me how to unshare the _entire_ network. The program I'm testing still needs to connect to my X server and dbus and even be able to listen on loopback for connections from other apps on the system. Ideally I'd like to avoid creating chroots or users or VMs or the like, since it becomes just as annoying as unplugging the network cable is. i.e. the point of the question is how can I make this as simple as a `sudo`. I'd love the process to run 100% normally except that network calls specifying a non-local address would fail. Ideally keeping the same uid, same homedir, same pwd, same everything except ... offline. I'm using Fedora 18, so unportable Linux answers are just fine (expected, even). I'm even happy to solve this by writing a C program, if that's what's involved, so answers that involve writing C are fine. I just don't know what syscalls that C program would need to make to revoke the external network access while keeping local network. Any developer trying to support "offline mode" would probably appreciate this utility!


title: Remove trailing new line from 'clipboard' to prevent execution on the terminal?

text: Is there some way to run whatever you copy to the 'clipboard' through some sort of filter? Ideally to strip out the trailing newline from something you copy, so that it doesn't auto-run in the terminal? This is what it looks like when I copy the test in question, and I sometimes forget this is a new line.   ![enter image description here](http://i.stack.imgur.com/7e0qY.png)


title: Lintian reports non-dev-pkg-with-shlib-symlink while dh_auto_install makes this link

text: So, I am trying to build the main package of a library (which means, without the development header file). When I run debuild lintian complains that:               W: libwebsitesnapshot1: non-dev-pkg-with-shlib-symlink usr/lib/i386-linux-gnu/libwebsitesnapshot.so.1.0.0 usr/lib/i386-linux-gnu/libwebsitesnapshot.so      So, I need to get rid the libwebsitesnapshot.so symlink. Searching what debhelper does, I found out that these symlinks are being built from 2 (!) separate places. The one place was dh_link and the other one was dh_auto_configure. In my debian/rules file I overrided dh_link with nothing, but I cannot override dh_auto_install with nothing, because it does more things than just linking. Here's my debian/rules file:               #!/usr/bin/make -f     export DH_VERBOSE=1          %:         dh $@          override_dh_auto_configure:         dh_auto_configure -- LIB_INSTALL_DIR=/usr/lib/$(DEB_HOST_MULTIARCH)     override_dh_link:      So: How am I going to get rid of just that .so file? What I've tried so far is adding               override_dh_auto_instal:         dh_auto_install -X .so      to debian/rules, in an attempt to make dh_auto_install to ignore the .so symlink, but to no avail.


title: Which Unixes support cross-device filesystem links (in particular for rename)?

text: Just read the following on the FreeBSD man page for the rename syscall:               ...     [EXDEV] The link named by to and the file named by from are on             different logical devices (file systems).  Note that             this error code will not be returned if the implemen-             tation permits cross-device links.     ...      Especially: > .. **if the implementation permits cross-device links.** Are there Unixes that implement this behavior using cross-device links? Which ones? Sidenote: One case, where it would be useful to have cross-device links is atomic renames. How can one have atomic renames if a the system (like most) does not support these over devices?


title: How does the script /etc/init.d/sudo work?

text: I was reading the script `/etc/init.d/sudo`. It has been written as a comment in the script that it **provides limited super user privileges to specific users**. Though, I could not understand the script as to how is it working? Can someone explain me the script? I am using Ubuntu 14.04 32-bit.


title: Lightdm user session settings on Ubuntu

text: Lightdm is displayed properly but after entering a password and clicking login, I see the screen blink and lightdm window re-appears and asks to log in as if nothing happened. ## Configs user@laptop:~$ cat /etc/lightdm/               lightdm.conf                     lightdm-gtk-greeter-ubuntu.conf       lightdm-gtk-greeter.conf         users.conf                             ## lightdm.conf user@laptop:~$ cat /etc/lightdm/lightdm.conf               #[LightDM]     #xsessions-directory=/usr/share/xsessions           [SeatDefaults]     user-session=xfce     greeter-session=lightdm-gtk-greeter     greeter-hide-users=true      ## lightdm-gtk-greeter.conf user@laptop:~$ cat /etc/lightdm/lightdm-gtk-greeter.conf               #     # background = Background file to use, either an image path or a color (e.g. #772953)     # theme-name = GTK+ theme to use     # font-name = Font to use     # xft-antialias = Whether to antialias Xft fonts (true or false)     # xft-dpi = Resolution for Xft in dots per inch (e.g. 96)     # xft-hintstyle = What degree of hinting to use (hintnone, hintslight, hintmedium, or hintfull)     # xft-rgba = Type of subpixel antialiasing (none, rgb, bgr, vrgb or vbgr)     #     [greeter]     logo=/usr/share/pixmaps/xubuntu-logo-menu.png     background=/usr/share/xfce4/backdrops/xubuntu-karmic.png     #show-language-selector=false     theme-name=retro1     font-name=Droid Sans 10     xft-antialias=true     #xft-dpi=     xft-hintstyle=hintfull     xft-rgba=rgb     show-language-selector=true      ## lightdm-gtk-greeter-ubuntu.conf user@laptop:~$ cat /etc/lightdm/lightdm-gtk-greeter-ubuntu.conf               #     # background = Background file to use, either an image path or a color (e.g. #772953)     # theme-name = GTK+ theme to use     # font-name = Font to use     # xft-antialias = Whether to antialias Xft fonts (true or false)     # xft-dpi = Resolution for Xft in dots per inch (e.g. 96)     # xft-hintstyle = What degree of hinting to use (hintnone, hintslight, hintmedium, or hintfull)     # xft-rgba = Type of subpixel antialiasing (none, rgb, bgr, vrgb or vbgr)     #     [greeter]     logo=/usr/share/pixmaps/xubuntu-logo-menu.png     background=/usr/share/xfce4/backdrops/xubuntu-karmic.png     #show-language-selector=false     theme-name=retro1     font-name=Droid Sans 10     xft-antialias=true     #xft-dpi=     xft-hintstyle=hintfull     xft-rgba=rgb     show-language-selector=true      ## users.conf user@laptop:~$ cat /etc/lightdm/users.conf               #     # User accounts configuration     #     # NOTE: If you have AccountsService installed on your system, then LightDM will     # use this instead and these settings will be ignored     #     # minimum-uid = Minimum UID required to be shown in greeter     # hidden-users = Users that are not shown to the user     # hidden-shells = Shells that indicate a user cannot login     #     [UserAccounts]     minimum-uid=500     hidden-users=nobody nobody4 noaccess     hidden-shells=/bin/false /usr/sbin/nologin      ## Logs user@laptop:~$ cat /var/log/lightdm/               lightdm.log          x-0-greeter.log.old  x-1-greeter.log      x-1.log                   x-0-greeter.log      x-0.log              x-1-greeter.log.old        user@laptop:~$ cat /var/log/lightdm/lightdm.log               cat: /var/log/lightdm/lightdm.log: Permission denied     user@laptop:~$ sudo cat /var/log/lightdm/lightdm.log     [sudo] password for user:      [+0.00s] DEBUG: Logging to /var/log/lightdm/lightdm.log     [+0.00s] DEBUG: Starting Light Display Manager 1.2.1, UID=0 PID=2677     [+0.00s] DEBUG: Loaded configuration from /etc/lightdm/lightdm.conf     [+0.00s] DEBUG: Using D-Bus name org.freedesktop.DisplayManager     [+0.00s] DEBUG: Registered seat module xlocal     [+0.00s] DEBUG: Registered seat module xremote     [+0.00s] DEBUG: Adding default seat     [+0.00s] DEBUG: Starting seat     [+0.00s] DEBUG: Starting new display for greeter     [+0.00s] DEBUG: Starting local X display     [+0.00s] DEBUG: Using VT 7     [+0.00s] DEBUG: Activating VT 7     [+0.01s] DEBUG: Logging to /var/log/lightdm/x-0.log     [+0.01s] DEBUG: Writing X server authority to /var/run/lightdm/root/:0     [+0.01s] DEBUG: Launching X Server     [+0.01s] DEBUG: Launching process 2683: /usr/bin/X :0 -auth /var/run/lightdm/root/:0 -nolisten tcp vt7 -novtswitch     [+0.01s] DEBUG: Waiting for ready signal from X server :0     [+0.01s] DEBUG: Acquired bus name org.freedesktop.DisplayManager     [+0.01s] DEBUG: Registering seat with bus path /org/freedesktop/DisplayManager/Seat0     [+0.91s] DEBUG: Got signal 10 from process 2683     [+0.91s] DEBUG: Got signal from X server :0     [+0.91s] DEBUG: Connecting to XServer :0     [+0.91s] DEBUG: Starting greeter     [+0.91s] DEBUG: Started session 2688 with service 'lightdm', username 'lightdm'     [+0.94s] DEBUG: Session 2688 authentication complete with return value 0: Success     [+0.94s] DEBUG: Greeter authorized     [+0.94s] DEBUG: Logging to /var/log/lightdm/x-0-greeter.log     [+0.94s] DEBUG: Session 2688 running command /usr/lib/lightdm/lightdm-greeter-session /usr/sbin/lightdm-gtk-greeter     [+1.12s] DEBUG: Greeter connected version=1.2.1     [+1.12s] DEBUG: Greeter connected, display is ready     [+1.12s] DEBUG: New display ready, switching to it     [+1.12s] DEBUG: Activating VT 7     [+1.45s] DEBUG: Greeter start authentication     [+1.45s] DEBUG: Started session 2733 with service 'lightdm', username '(null)'     [+1.46s] DEBUG: Session 2733 got 1 message(s) from PAM     [+1.46s] DEBUG: Prompt greeter with 1 message(s)     [+2.98s] DEBUG: Continue authentication     [+2.99s] DEBUG: Session 2733 got 1 message(s) from PAM     [+2.99s] DEBUG: Prompt greeter with 1 message(s)     [+8.36s] DEBUG: Continue authentication     [+8.41s] DEBUG: Session 2733 authentication complete with return value 0: Success     [+8.41s] DEBUG: Authenticate result for user user: Success     [+8.42s] DEBUG: User user authorized     [+8.42s] DEBUG: Greeter requests session xfce     [+8.42s] DEBUG: Using session xfce     [+8.42s] DEBUG: Stopping greeter     [+8.42s] DEBUG: Session 2688: Sending SIGTERM     [+8.46s] DEBUG: Session 2688 exited with return value 0     [+8.46s] DEBUG: Greeter quit     [+8.47s] DEBUG: Dropping privileges to uid 1001     [+8.47s] DEBUG: Restoring privileges     [+8.47s] DEBUG: Dropping privileges to uid 1001     [+8.47s] DEBUG: Writing /home/user/.dmrc     [+8.54s] DEBUG: Restoring privileges     [+8.58s] DEBUG: Starting session xfce as user user     [+8.58s] DEBUG: Session 2733 running command /usr/sbin/lightdm-session startxfce4     [+8.60s] DEBUG: Registering session with bus path /org/freedesktop/DisplayManager/Session0     [+8.60s] DEBUG: Greeter closed communication channel     [+8.60s] DEBUG: Session 2733 exited with return value 1     [+8.60s] DEBUG: User session quit     [+8.60s] DEBUG: Stopping display     [+8.60s] DEBUG: Sending signal 15 to process 2683     [+8.77s] DEBUG: Process 2683 exited with return value 0     [+8.77s] DEBUG: X server stopped     [+8.77s] DEBUG: Removing X server authority /var/run/lightdm/root/:0     [+8.77s] DEBUG: Releasing VT 7     [+8.77s] DEBUG: Display server stopped     [+8.77s] DEBUG: Display stopped     [+8.77s] DEBUG: Active display stopped, switching to greeter     [+8.77s] DEBUG: Switching to greeter     [+8.77s] DEBUG: Starting new display for greeter     [+8.77s] DEBUG: Starting local X display     [+8.77s] DEBUG: Using VT 7     [+8.77s] DEBUG: Logging to /var/log/lightdm/x-0.log     [+8.77s] DEBUG: Writing X server authority to /var/run/lightdm/root/:0     [+8.77s] DEBUG: Launching X Server     [+8.77s] DEBUG: Launching process 2764: /usr/bin/X :0 -auth /var/run/lightdm/root/:0 -nolisten tcp vt7 -novtswitch     [+8.77s] DEBUG: Waiting for ready signal from X server :0     [+9.68s] DEBUG: Got signal 10 from process 2764     [+9.68s] DEBUG: Got signal from X server :0     [+9.68s] DEBUG: Connecting to XServer :0     [+9.68s] DEBUG: Starting greeter     [+9.68s] DEBUG: Started session 2769 with service 'lightdm', username 'lightdm'     [+9.70s] DEBUG: Session 2769 authentication complete with return value 0: Success     [+9.71s] DEBUG: Greeter authorized     [+9.71s] DEBUG: Logging to /var/log/lightdm/x-0-greeter.log     [+9.71s] DEBUG: Session 2769 running command /usr/lib/lightdm/lightdm-greeter-session /usr/sbin/lightdm-gtk-greeter     [+9.87s] DEBUG: Greeter connected version=1.2.1     [+9.87s] DEBUG: Greeter connected, display is ready     [+9.87s] DEBUG: New display ready, switching to it     [+9.87s] DEBUG: Activating VT 7     [+9.87s] DEBUG: Stopping greeter display being switched from     [+10.20s] DEBUG: Greeter start authentication     [+10.20s] DEBUG: Started session 2814 with service 'lightdm', username '(null)'     [+10.20s] DEBUG: Session 2814 got 1 message(s) from PAM     [+10.20s] DEBUG: Prompt greeter with 1 message(s)     [+110.97s] DEBUG: Got signal 15 from process 1     [+110.97s] DEBUG: Caught Terminated signal, shutting down     [+110.97s] DEBUG: Stopping display manager     [+110.97s] DEBUG: Stopping seat     [+110.97s] DEBUG: Stopping display     [+110.97s] DEBUG: Session 2769: Sending SIGTERM     [+110.97s] DEBUG: Session 2814 terminated with signal 15     [+110.97s] DEBUG: Session 2814 failed during authentication     [+110.97s] DEBUG: Authenticate result for user (null): Authentication stopped before completion     [+111.04s] DEBUG: Session 2769 exited with return value 15     [+111.04s] DEBUG: Greeter quit     [+111.04s] DEBUG: Sending signal 15 to process 2764     [+111.06s] DEBUG: Process 2764 exited with return value 0     [+111.06s] DEBUG: X server stopped     [+111.06s] DEBUG: Removing X server authority /var/run/lightdm/root/:0     [+111.06s] DEBUG: Releasing VT 7     [+111.06s] DEBUG: Display server stopped     [+111.06s] DEBUG: Display stopped     [+111.06s] DEBUG: Seat stopped     [+111.06s] DEBUG: Display manager stopped     [+111.06s] DEBUG: Stopping daemon     [+111.06s] DEBUG: Exiting with return value 0      ## Installed packages A web search suggested I need to install additional packages, such as lightdm- gtk-greeter, but I already have it installed.               user@laptop:~$ sudo dpkg -l lightdm*     Desired=Unknown/Install/Remove/Purge/Hold     | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend     |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)     ||/ Name                        Version                     Description     +++-===========================-===========================-======================================================================     ii  lightdm                     1.2.1-0ubuntu1.1            Display Manager     un  lightdm-greeter             <none>                      (no description available)     un  lightdm-greeter-example-gtk <none>                      (no description available)     ii  lightdm-gtk-greeter         1.1.5-0ubuntu1              LightDM GTK+ Greeter     un  lightdm-gtk-greeter-config  <none>                      (no description available)     user@laptop:~$      ## Unity-greeter solution (not what I want) Bug 850941, bug 804171 suggest using unity-greeter with lightdm. This might work, but lightdm does not depend on unity-greeter, and I am trying to use the lightdm-gtk-greeter alternative. ## Problem interpretation The way I see it, the problem is that the user session is not defined properly. It is started and closes off at once. Relevant snippet from the log:               [+8.58s] DEBUG: Starting session xfce as user user     [+8.58s] DEBUG: Session 2733 running command /usr/sbin/lightdm-session startxfce4     [+8.60s] DEBUG: Registering session with bus path /org/freedesktop/DisplayManager/Session0     [+8.60s] DEBUG: Greeter closed communication channel     [+8.60s] DEBUG: Session 2733 exited with return value 1     [+8.60s] DEBUG: User session quit     [+8.60s] DEBUG: Stopping display     [+8.60s] DEBUG: Sending signal 15 to process 2683     [+8.77s] DEBUG: Process 2683 exited with return value 0     [+8.77s] DEBUG: X server stopped     [+8.77s] DEBUG: Removing X server authority /var/run/lightdm/root/:0     [+8.77s] DEBUG: Releasing VT 7     [+8.77s] DEBUG: Display server stopped     [+8.77s] DEBUG: Display stopped     [+8.77s] DEBUG: Active display stopped, switching to greeter      I am using the xfce desktop environment and any working examples would be appreciated.


title: How to use persistent names in LILO?

text: I have two SATA drives, but their names `/dev/sda` and `/dev/sdb` are chosen randomly by Linux. How can I correctly set up LILO? How can I put a stable reference to the hard drives in `lilo.conf`? **ADDED.** Can I use udev's names (like /dev/disk/by-id/*) in lilo.conf? LILO dont read lilo.conf at each boot, but only once on setup MBR when I run 'lilo' without arguments. At this stage udev names are available. But how do LILO store information about disks to MBR and boot-files? I use dual-boot with Windows, but NTFS disks have no UUID. I want to use udev's id.


title: vfat not recognized in debian

text: I want to mount my usb drive (kindle vfat32). When I do               mount -t auto /dev/sdf1 /mnt/usb      I get               mount: unknown filesystem type 'vfat'        * I checked if the drive is recognized with `sudo fdisk -l` and the recognized filesystem is `W95 FAT32`   * my kernel is `3.2.0-4-686-pae`.    * I checked the recognized filesystem with `cat /proc/filesystems` and vfat is not there.    * `dosfstools` is installed what should I do? * * * I am using the kernel released in the minimal netbook installation of debian. If I run `modprobe vfat` as root I get the following:               libkmod: ERROR ../libkmod/libkmod-module.c:174 kmod_module_parse_depline: ctx=0xb8556008 path=/lib/modules/3.2.0-4-686-pae/kernel/fs/fat/fat.ko error=No such file or directory     libkmod: ERROR ../libkmod/libkmod-module.c:174 kmod_module_parse_depline: ctx=0xb8556008 path=/lib/modules/3.2.0-4-686-pae/kernel/fs/fat/fat.ko error=No such file or directory     ERROR: could not insert 'vfat': Unknown symbol in module, or unknown parameter (see dmesg)      * * * When I `cat /proc/modules` I get:               dm_mod 57362 0 - Live 0xfcb45000     ip6table_filter 12492 1 - Live 0xf847a000     ip6_tables 17185 1 ip6table_filter, Live 0xf8564000     snd_hda_codec_realtek 142274 1 - Live 0xf86a3000     ppdev 12651 0 - Live 0xf8408000     binfmt_misc 12813 1 - Live 0xf8454000     lp 12797 0 - Live 0xf846d000     nfsd 173890 0 - Live 0xf8711000     nfs 265921 0 - Live 0xf86cf000     nfs_acl 12463 2 nfsd,nfs, Live 0xf8437000     auth_rpcgss 32143 2 nfsd,nfs, Live 0xf8501000     fscache 31978 1 nfs, Live 0xf8494000     lockd 57277 2 nfsd,nfs, Live 0xf850a000     sunrpc 143904 6 nfsd,nfs,nfs_acl,auth_rpcgss,lockd, Live 0xf852e000     iptable_filter 12488 1 - Live 0xf8403000     ip_tables 17079 1 iptable_filter, Live 0xf8421000     x_tables 18158 4 ip6table_filter,ip6_tables,iptable_filter,ip_tables, Live 0xf8414000     usbhid 31554 0 - Live 0xf84cf000     hid 60152 1 usbhid, Live 0xf84e5000     nouveau 526808 3 - Live 0xf856d000     mxm_wmi 12467 1 nouveau, Live 0xf8385000     video 17459 1 nouveau, Live 0xf841b000     ttm 47786 1 nouveau, Live 0xf842a000     drm_kms_helper 22738 1 nouveau, Live 0xf840d000     drm 146387 5 nouveau,ttm,drm_kms_helper, Live 0xf84aa000     snd_hda_intel 21786 6 - Live 0xf8473000     snd_hda_codec 63477 2 snd_hda_codec_realtek,snd_hda_intel, Live 0xf8443000     snd_hwdep 12943 1 snd_hda_codec, Live 0xf835b000     snd_pcm 53461 3 snd_hda_intel,snd_hda_codec, Live 0xf8459000     snd_page_alloc 12867 2 snd_hda_intel,snd_pcm, Live 0xf843e000     snd_seq 39512 0 - Live 0xf8394000     snd_seq_device 13016 1 snd_seq, Live 0xf82e3000     snd_timer 22356 2 snd_pcm,snd_seq, Live 0xf8363000     power_supply 13283 1 nouveau, Live 0xf8356000     snd 42722 19 snd_hda_codec_realtek,snd_hda_intel,snd_hda_codec,snd_hwdep,snd_pcm,snd_seq,snd_seq_device,snd_timer, Live 0xf834a000     i2c_nforce2 12520 0 - Live 0xf8345000     i2c_algo_bit 12713 1 nouveau, Live 0xf83fe000     i2c_core 19116 5 nouveau,drm_kms_helper,drm,i2c_nforce2,i2c_algo_bit, Live 0xf8378000     soundcore 12921 1 snd, Live 0xf82d0000     evdev 17225 8 - Live 0xf82f7000     acpi_cpufreq 12807 0 - Live 0xf82e8000     mperf 12421 1 acpi_cpufreq, Live 0xf82de000     processor 27565 1 acpi_cpufreq, Live 0xf84a2000     thermal_sys 17752 2 video,processor, Live 0xf8372000     parport_pc 22036 0 - Live 0xf83a9000     parport 31254 3 ppdev,lp,parport_pc, Live 0xf83a0000     coretemp 12770 0 - Live 0xf838f000     container 12525 0 - Live 0xf838a000     button 12817 1 nouveau, Live 0xf8380000     wmi 13051 2 nouveau,mxm_wmi, Live 0xf836d000     pcspkr 12515 0 - Live 0xf82fe000     loop 17810 0 - Live 0xf82d8000     autofs4 22784 2 - Live 0xf82f0000     ext4 306996 3 - Live 0xf83b2000     crc16 12327 1 ext4, Live 0xf82be000     jbd2 52330 1 ext4, Live 0xf82b0000     mbcache 12938 1 ext4, Live 0xf8239000     usb_storage 35142 0 - Live 0xf82c6000     sg 21476 0 - Live 0xf8264000     sr_mod 17468 0 - Live 0xf82aa000     sd_mod 35425 5 - Live 0xf8295000     cdrom 34813 1 sr_mod, Live 0xf82a0000     crc_t10dif 12332 1 sd_mod, Live 0xf8234000     ata_generic 12439 0 - Live 0xf822f000     ahci 24917 4 - Live 0xf828d000     libahci 18308 1 ahci, Live 0xf8242000     ohci_hcd 22059 0 - Live 0xf826c000     r8169 41802 0 - Live 0xf8281000     mii 12595 1 r8169, Live 0xf821f000     libata 125014 3 ata_generic,ahci,libahci, Live 0xf8325000     ehci_hcd 35509 0 - Live 0xf8273000     scsi_mod 135037 5 usb_storage,sg,sr_mod,sd_mod,libata, Live 0xf8303000     usbcore 104555 5 usbhid,usb_storage,ohci_hcd,ehci_hcd, Live 0xf8249000     usb_common 12338 1 usbcore, Live 0xf8215000


title: Order of mounting USB devices in Linux

text: I'm running a Ubuntu system where USB drives are mounted automatically.   I'm curious to what happens when a USB device plugs in a port. Which part of the linux senses that a new device has been plugged in? After that which processes (and what is the caller or callers) are called to mount it to the system? Are theese kernel-space, user-space processes or mixed ? I'd like to follow theese steps in a C/C++ program. Is there any way to do that? Where could I read more about it? How would you do it?


title: can't change user

text: I setup `vsftp` with my ftp users' home directory at `/var/www` but I realized, it wouldn't let em login by ftp, I tried to connect to `127.0.0.1`. So then i wanted to "try out" my ftp user on the shell but I get this:               reg@regDesktopHome:~$ whoami     reg     reg@regDesktopHome:~$ su - ftp     Password:      reg@regDesktopHome:~$ whoami     reg      Why does `su` not let me change the current user I'm wondering?


title: installing/configuring and running sshguard on debian

text: I am trying to install/configure and run sshguard on debian, I want to check if brute force attacks happen on my server. I have installed it via apt-get, then I installed systemd and followed the following instructions for configuring https://wiki.archlinux.org/index.php/Sshguard (but those are for archlinux). when I type `systemctl enable sshguard` it does not work and I get `Failed to issue method call: Unit name sshguard is not valid.` I know this should be a routine task, but it is the first time I have to work with daemon. This stuff is very new to me and I am lost in the documentation. I would like to configure the thing in a way that it default: it bans temporarily ip after 4 failed attempts and of course I would like to start the service at boot. Maybe I can entirely forget about it because I intend to allow passwordless login (via public key exchange) * * * when I start `sshguard` with `/etc/init.d/sshguard start` , I get               [....] Starting sshguard (via systemctl): sshguard.serviceFailed to issue method call: Access denied failed!


I've been doing some research into improving performance for OpenVPN and I found out about setting fastforwarding to 1 but when I tried I got the error `error: "net.inet.ip.fastforwarding" is an unknown key` and tried `error: "net.ipv4.ip.fastforwarding" is an unknown key`and wanted to know if I needed to load a module? This is a CentoOS 6.x 64bit box.


title: Compacting `find` name patterns

text: I am using               find . -name '*.[cCHh][cC]' -exec grep -nHr "$1" {} ';'     find . -name '*.[cCHh]' -exec grep -nHr "$1" {} ';'      to search for a string in all files ending with .c, .C, .h, .H, .cc and .CC listed in all subdirectories. But since this includes two commands this feels inefficient. How do I write a regex to include .c,.C,.h,.H,.cc and .CC files using one single regex? EDIT: I am running this on bash on a Linux machine.


title: Is it possible for du to report significantly more disk in use than the mount point has available?

text: I ran into an interesting situation the other day. I have a 1TB NFS filesystem mounted on /backup. `df` reported approx 1TB total size, as expected. However, running `du -csh .` in the /backup/.snapshot directory reported 3.0 TB of data. I have never seen du produce output that is greater in total size than the mount point. This NFS share is provided by a NetApp appliance. The .snapshot directory is created by the NetApp afaik, configured to use 5% of space. (and of course, shouldn't be possible to use 300% of space) So is this a Linux issue, an NFS issue, a NetApp issue, or something else? What other data can I provide? OS is CentOS 6.


title: for vs find in Bash

text: When looping through files there are two ways: **`1.` use a for-loop**               for f in *; do         echo "$f"     done      **`2.` use `find`**               find * -prune | while read f; do          echo "$f"     done      Assuming these two loops will find the same list of files, what are the differences in those two options in **perfomance** and handling?


title: Apache configuration issues

text: I'm running OpenSuSE Linux and installed `apache`, `php`, `mysql`, `vsftp` for web experiments. I installed Wordpress on local Apache but... problem comes from here. So I've localhost/wordpress as root directory, which is `/srv/www/htdocs/wordpress/` of course there is content directory and plugins and themes... Wordpress can see installed plugins and themes, but doesn't see sub- directories of theme directory. So no images, nothing else what is in sub- directories isn't displayed. I 've checked, it isn't a theme issue.... something on Apache needs to be configured.


title: vsftp user authentication problems

text: I configured my ftp user's home dir to `/var/www` and set a password but I cannot login with `ftp 127.0.0.1`, it keep giving me `530 Login incorrect.` Why is this? I'm sure I have typed the password right. **edit 1** My config `/etc/vsftpd.conf` looks like:               # Example config file /etc/vsftpd.conf     #     # The default compiled in settings are fairly paranoid. This sample file     # loosens things up a bit, to make the ftp daemon more usable.     # Please see vsftpd.conf.5 for all compiled in defaults.     #     # READ THIS: This example file is NOT an exhaustive list of vsftpd options.     # Please read the vsftpd.conf.5 manual page to get a full idea of vsftpd's     # capabilities.     #     #     # Run standalone?  vsftpd can run either from an inetd or as a standalone     # daemon started from an initscript.     listen=YES     #     # Run standalone with IPv6?     # Like the listen parameter, except vsftpd will listen on an IPv6 socket     # instead of an IPv4 one. This parameter and the listen parameter are mutually     # exclusive.     #listen_ipv6=YES     #     # Allow anonymous FTP? (Disabled by default)     anonymous_enable=NO     #     # Uncomment this to allow local users to log in.     local_enable=YES     #     # Uncomment this to enable any form of FTP write command.     write_enable=YES     #     # Default umask for local users is 077. You may wish to change this to 022,     # if your users expect that (022 is used by most other ftpd's)     #local_umask=022     #     # Uncomment this to allow the anonymous FTP user to upload files. This only     # has an effect if the above global write enable is activated. Also, you will     # obviously need to create a directory writable by the FTP user.     #anon_upload_enable=YES     #     # Uncomment this if you want the anonymous FTP user to be able to create     # new directories.     #anon_mkdir_write_enable=YES     #     # Activate directory messages - messages given to remote users when they     # go into a certain directory.     dirmessage_enable=YES     #     # If enabled, vsftpd will display directory listings with the time     # in  your  local  time  zone.  The default is to display GMT. The     # times returned by the MDTM FTP command are also affected by this     # option.     use_localtime=YES     #     # Activate logging of uploads/downloads.     xferlog_enable=YES     #     # Make sure PORT transfer connections originate from port 20 (ftp-data).     connect_from_port_20=YES     #     # If you want, you can arrange for uploaded anonymous files to be owned by     # a different user. Note! Using "root" for uploaded files is not     # recommended!     #chown_uploads=YES     #chown_username=whoever     #     # You may override where the log file goes if you like. The default is shown     # below.     #xferlog_file=/var/log/vsftpd.log     #     # If you want, you can have your log file in standard ftpd xferlog format.     # Note that the default log file location is /var/log/xferlog in this case.     #xferlog_std_format=YES     #     # You may change the default value for timing out an idle session.     #idle_session_timeout=600     #     # You may change the default value for timing out a data connection.     #data_connection_timeout=120     #     # It is recommended that you define on your system a unique user which the     # ftp server can use as a totally isolated and unprivileged user.     #nopriv_user=ftpsecure     #     # Enable this and the server will recognise asynchronous ABOR requests. Not     # recommended for security (the code is non-trivial). Not enabling it,     # however, may confuse older FTP clients.     #async_abor_enable=YES     #     # By default the server will pretend to allow ASCII mode but in fact ignore     # the request. Turn on the below options to have the server actually do ASCII     # mangling on files when in ASCII mode.     # Beware that on some FTP servers, ASCII support allows a denial of service     # attack (DoS) via the command "SIZE /big/file" in ASCII mode. vsftpd     # predicted this attack and has always been safe, reporting the size of the     # raw file.     # ASCII mangling is a horrible feature of the protocol.     #ascii_upload_enable=YES     #ascii_download_enable=YES     #     # You may fully customise the login banner string:     #ftpd_banner=Welcome to blah FTP service.     #     # You may specify a file of disallowed anonymous e-mail addresses. Apparently     # useful for combatting certain DoS attacks.     #deny_email_enable=YES     # (default follows)     #banned_email_file=/etc/vsftpd.banned_emails     #     # You may restrict local users to their home directories.  See the FAQ for     # the possible risks in this before using chroot_local_user or     # chroot_list_enable below.     #chroot_local_user=YES     #     # You may specify an explicit list of local users to chroot() to their home     # directory. If chroot_local_user is YES, then this list becomes a list of     # users to NOT chroot().     # (Warning! chroot'ing can be very dangerous. If using chroot, make sure that     # the user does not have write access to the top level directory within the     # chroot)     chroot_local_user=YES     #chroot_list_enable=YES     # (default follows)     #chroot_list_file=/etc/vsftpd.chroot_list     #     # You may activate the "-R" option to the builtin ls. This is disabled by     # default to avoid remote users being able to cause excessive I/O on large     # sites. However, some broken FTP clients such as "ncftp" and "mirror" assume     # the presence of the "-R" option, so there is a strong case for enabling it.     #ls_recurse_enable=YES     #     # Customization     #     # Some of vsftpd's settings don't fit the filesystem layout by     # default.     #     # This option should be the name of a directory which is empty.  Also, the     # directory should not be writable by the ftp user. This directory is used     # as a secure chroot() jail at times vsftpd does not require filesystem     # access.     secure_chroot_dir=/var/run/vsftpd/empty     #     # This string is the name of the PAM service vsftpd will use.     pam_service_name=vsftpd     #     # This option specifies the location of the RSA certificate to use for SSL     # encrypted connections.     rsa_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem     # This option specifies the location of the RSA key to use for SSL     # encrypted connections.     rsa_private_key_file=/etc/ssl/private/ssl-cert-snakeoil.key          allow_writeable_chroot=YES      and permissions are set to `777`:               reg@regDesktopHome:~$ ls -ld /var/www/     drwxrwxrwx 11 root root 4096 Feb 19 20:42 /var/www/      And the log file at `/var/log/vsftp.log` only says:               Tue Feb 25 21:19:38 2014 [pid 18250] CONNECT: Client "127.0.0.1"     Tue Feb 25 21:19:46 2014 [pid 18249] [ftp] FAIL LOGIN: Client "127.0.0.1"      Oh and syslog-ng doesn't say anything at `/var/log/messages`


title: what is the linux boot param "memmap" equivalent in freebsd

text: In linux kernel, there is an option to reserve a portion of system ram i.e memmap=512M$2G (boot param) Here 512M starting from 2G would be reserved and not available to OS What is the equivalent in freebsd ?


title: "Can't cd to /home/user" when sourcing a script

text: I have this script:               echo $HOME     cd $HOME     cd /     cd /usr/local/src/      When I run it like this               . script.sh      I get this output:               /home/user     : No such file or directory     : No such file or directory     : No such file or directory      If I run it normally (I added `#!/bin/bash` before the first line)               sh script.sh      I get this output:               : not found.sh: 2: script.sh     /home/user     script.sh: 3: Can't cd to /home/user     script.sh: 4: Can't cd to /     script.sh: 5: Can't cd to /usr/local/src/      The script was run from `$HOME` directory each time. If I run each command one by one from shell, it executed without problems (invoking `cd $HOME` from within `$HOME` simply didn't change directory). What must I do to make this work?


title: Xubuntu Media plays at triple+ speed

text: Out of the blue today, I just booted my PC and Raspberry Pi like normal, with my PC running Xubuntu and my RPI running Raspbian, and on my PC at least ALL media is running at triple or higher speed. Youtube videos, mp3's and normal videos all run at triple speed. They also won't play any sound, and I am sure I have my speakers turned on and medium volume. On my windows 7 partition everything still works. Something like this has never happened to me before, and is obviously very strange. The only thing I can remember to have done is `sudo apt-get update` and `sudo apt-get upgrade`. I have looked at the following, but I don't have any sound settings anywhere. http://www.hanckmann.net/?q=high_speed_video_and_no_audio_in_linux My Raspberry Pi can't play any sound for whatever reason so I wouldn't know about the RPI. Obviously, my question is, how can I play media normally again? /IP


title: How to get "undefined references" such as "s_wsfi" and "do_fio" in f77 32-bit Fortran libraries using `gfortran -m32`?

text: Update: Per steeldriver's suggestion, I have tried to get libf2c, and have posted my new error here. ======== I am new to Fortran, but this is what I know:   * I am running on Ubuntu 14.04   * My fortran file is f77   * The libraries that it uses are i386, which I'm pretty sure are 32-bit   * I can get them to compile using `gfortran -m32` with packages lib32gfortran-4.8-dev and gcc-multilib.   * I get my library files, namely libmathlib.a and libkernlib.a, from the CERNLIB downloads, which has many versions. I've tried multiple versions, including the newest from 2006, but I get the same undefined references. The errors are all similar, such as: `undefined reference to 's_wsfi'` **How can I get these references, such as`s_wsfe` or `e_wsfe`?** Can I download them somewhere or compile them from somewhere to 32 bit? If so, how? This what I get from running the 2004 version of libmathlib.a and libkernlib.a, I get the same errors from the 2006 version too:                   $ gfortran -m32 -O -o out10 MBpart1ep0.f -L. -lmathlib -lkernlib -Lcuba              /tmp/ccs5Njbz.o: In function `MAIN__':         MBpart1ep0.f:(.text+0x82): undefined reference to `cuhre_'         //usr/local/lib/libmathlib.a(cgamma64.o): In function `wgamma_':         cgamma64.F:(.text+0xd1): undefined reference to `s_wsfi'         cgamma64.F:(.text+0xe5): undefined reference to `do_fio'         cgamma64.F:(.text+0xea): undefined reference to `e_wsfi'         cgamma64.F:(.text+0x424): undefined reference to `z_log'         cgamma64.F:(.text+0x47e): undefined reference to `z_exp'         cgamma64.F:(.text+0x522): undefined reference to `z_sin'         //usr/local/lib/libmathlib.a(wpsipg.o): In function `wpsipg_':         wpsipg.F:(.text+0x97): undefined reference to `s_wsfi'         wpsipg.F:(.text+0xa7): undefined reference to `do_fio'         wpsipg.F:(.text+0xac): undefined reference to `e_wsfi'         wpsipg.F:(.text+0x1b4): undefined reference to `s_wsfi'         wpsipg.F:(.text+0x1c8): undefined reference to `do_fio'         wpsipg.F:(.text+0x1cd): undefined reference to `e_wsfi'         wpsipg.F:(.text+0x8e7): undefined reference to `z_log'         //usr/local/lib/libmathlib.a(mtlprt.o): In function `mtlprt_':         mtlprt.F:(.text+0x20): undefined reference to `s_cmp'         mtlprt.F:(.text+0x90): undefined reference to `s_wsfe'         mtlprt.F:(.text+0xa0): undefined reference to `do_fio'         mtlprt.F:(.text+0xb3): undefined reference to `do_fio'         mtlprt.F:(.text+0xc2): undefined reference to `do_fio'         mtlprt.F:(.text+0xd6): undefined reference to `do_fio'         mtlprt.F:(.text+0xdb): undefined reference to `e_wsfe'         mtlprt.F:(.text+0xfe): undefined reference to `s_wsfe'         mtlprt.F:(.text+0x10e): undefined reference to `do_fio'         mtlprt.F:(.text+0x121): undefined reference to `do_fio'         mtlprt.F:(.text+0x130): undefined reference to `do_fio'         mtlprt.F:(.text+0x144): undefined reference to `do_fio'         mtlprt.F:(.text+0x149): undefined reference to `e_wsfe'         //usr/local/lib/libmathlib.a(mtlset.o): In function `__g77_masterfun_mtlset':         mtlset.F:(.text+0x38): undefined reference to `s_cmp'         mtlset.F:(.text+0x5d): undefined reference to `s_cmp'         mtlset.F:(.text+0xa7): undefined reference to `s_cmp'         mtlset.F:(.text+0x11a): undefined reference to `s_cmp'         mtlset.F:(.text+0x137): undefined reference to `s_wsfe'         mtlset.F:(.text+0x147): undefined reference to `do_fio'         mtlset.F:(.text+0x14c): undefined reference to `e_wsfe'         mtlset.F:(.text+0x1d7): undefined reference to `s_wsfe'         mtlset.F:(.text+0x1f6): undefined reference to `do_fio'         mtlset.F:(.text+0x1fb): undefined reference to `e_wsfe'         mtlset.F:(.text+0x21e): undefined reference to `s_wsfe'         mtlset.F:(.text+0x23d): undefined reference to `do_fio'         mtlset.F:(.text+0x242): undefined reference to `e_wsfe'         collect2: error: ld returned 1 exit status      Since the errors show that code inside libmathlib.a are referencing .f files that reference functions that are undefined, I feel like my libmathlib is being read correctly. **Again, how can I get the references, such as`s_wsfe` or `e_wsfe`?** Can I download them somewhere or compile them from somewhere to 32 bit? If so, how?


title: Check whether files in a file list exist in a certain directory

text: The runtime arguments are as follows: $1 is the path to the file containing the list of files $2 is the path to the directory containing the files What I want to do is check that each file listed in $1 exists in the $2 directory I'm thinking something like:               for f in 'cat $1'     do     if (FILEEXISTSIN$2DIRECTORY)     then echo '$f exists in $2'     else echo '$f is missing in $2' sleep 5 exit     fi     done      As you can see, I want it so that if any of the files listed in `$1` don't exist in the directory `$2`, the script states this then closes. The only part I can't get my head around is the `(FILEEXISTSIN$2DIRECTORY)` part. I know that you can do `[ -e $f ]` but I don't know how you can make sure its checking that it exists in the `$2` directory. Thank you, I hope you can help this bash noob out.


title: How to disable VLC output in command-line mode?

text: When I play music on `vlc` or `cvlc` in terminal or console there is always this _(shown below)_ non-stopping output that prevents me from issuing commands by pressing `ENTER` key. I want to disable it, I tried to start vlc with `vlc -q` switch in quite mode but it only gets rid of **[ ]** bracket parts, the rest still remains and continues to grow. So, how to make `vlc` completely not to show this information and still be able to execute command-line commands like `next`, `play`, `random` etc?               VLC media player 2.0.7 Twoflower (revision 2.0.6-54-g7dd7e4d)     [0x255e418] dummy interface: using the dummy interface module...     libdvdnav: Using dvdnav version 4.2.0     libdvdread: Encrypted DVD support unavailable.     libdvdread: Attempting to use device /dev/sdb1 mounted on /run/media/easl/freyja for CSS authentication     libdvdread: Could not open input: Permission denied     libdvdread: Can't open /dev/sdb1 for reading     libdvdread: Device /dev/sdb1 inaccessible, CSS authentication not available.     libdvdnav:DVDOpenFilePath:findDVDFile /VIDEO_TS/VIDEO_TS.IFO failed     libdvdnav:DVDOpenFilePath:findDVDFile /VIDEO_TS/VIDEO_TS.BUP failed     libdvdread: Can't open file VIDEO_TS.IFO.     libdvdnav: vm: failed to read VIDEO_TS.IFO     [0x24966b8] main playlist: stopping playback     TagLib: MPEG::Header::parse() -- Invalid sample rate.     TagLib: ID3v2.4 no longer supports the frame type TDAT.  It will be discarded from the tag.     TagLib: MPEG::Header::parse() -- Invalid sample rate.     TagLib: MPEG::Header::parse() -- Invalid sample rate.     TagLib: ID3v2.4 no longer supports the frame type TDAT.  It will be discarded from the tag.     TagLib: MPEG::Header::parse() -- Invalid sample rate.


title: Alix Board write performance

text: I have an alix board on which I have installed debian4alix (sqeeze). After using it for a while I noticed that the write performance of the board was pretty low. I ran the following test:               dd count=100 bs=1M if=/dev/urandom of=/var/www/cgrid/test      This yielded the following:               100+0 records in     100+0 records out     104857600 bytes (105 MB) copied, 328.903 s, 319 kB/s      This is the same speed I get when running the test on the compact flash card that the OS is installed on or on a flash disk. I had tested the flash disk performance on a linux desktop PC and achieved speeds around 15.3 MB/s using the same tests. My read speed on the alix board is around 9MB/s (tested with `hdparm -t`) I would like to know if the slow write speeds I am receiving is a result of the operating system ( since it is not running directly off the compact flash card but off a ramdisk) or from the embedded hardware solution being really slow.


title: Rip audio CDs while keeping extraction and encoding separate

text: I'd like to rip my audio CDs to mp3. I know this has been discussed to a good extent but I'm not sure if my setup makes sense, though. I want to use an older PC for that and I have read on the net that concurrent encoding can compromise the quality of the audio extraction. I suspect this has happened already in a test run because there were sound issues for one mp3 that could not be explained by a scratched surface. So I thought it would be a good idea to keep the two steps apart. So my questions is: **Do you know of any solution to extract mp3s from an audio CD that first extracts _all_ tracks as wavs and _after that_ starts with the encoding?** I looked at `K3b`, `ripperX` and `abcde`. All of them start encoding while extraction is still in process. The best thing that came to my mind was calling `abcde` twice: first for just querying the cddb and wav extraction of all tracks, second for converting the extracted wavs to mp3s giving them the correct names and tagging information. The command line for that looks like this               $ abcde -a cddb,read && abcde -o mp3      I know that one could start from scratch and write a shell script for extraction using `cdparanoia`, encoding with `lame`, tagging with IDv3, querying cddb but this is not a trivial job (see e.g. these examples), not to mention that `abcde` additionally does some nice munching of the track names. But I'd rather use as much of the things that are available already. * * * **EDIT:** After sr_'s valuable hint the commandline can be simplified to               $ abcde -l -o mp3      with the "l" option for low disk space being the important part. Now abcde reads the first track, then encodes and tags it, after that it reads the second track, encodes and tags it and so forth...


title: Debian installation media with non-free packages?

text: Are there any Debian DVDs (Lenny, 5.0) out there that include the non-free hardware driver components?


title: pipe, { list; } only works with some programs

text: Need explanations from power users for such unpredictable behaviour:               ps -eF | { head -n 1;grep worker; }     UID        PID  PPID  C    SZ   RSS PSR STIME TTY          TIME CMD     root       441     2  0     0     0   2 paź15 ?       00:00:00 [kworker/2:1H]      everything looks ok whereas               ls -la / | { head -n 1;grep sbin; }      displays only output from `head` ... I thought about `stdout 2>&1` and doesn't work neither for me it's weird, any explanations or suggest how to handle it?


title: Pressing `up` to get the previous command in a tty on Ubuntu Server

text: I've installed Ubuntu Server 10.10, and when I press `up` in a terminal nothing happens. Using Ubuntu Desktop it gave me the previous command that I ran. How can I make it do this in Ubuntu Server as well?


title: Copy multiple files from filename X to filename Y?

text: I'm pretty noob when it comes to unix commands. What I want to do is to copy files within a lexicographic range. Example of files:               -rw-r--r--   1 root root   15276 Oct  5  2004 a2ps.cfg     -rw-r--r--   1 root root    2562 Oct  5  2004 a2ps-site.cfg     -rw-r--r--   4 root root    4096 Feb  2  2007 acpi.txt     -rw-r--r--   1 root root      48 Feb  8  2008 adjtime.jpg     -rw-r--r--   4 root root    4096 Feb  2  2007 alchemist.jpg      Example of use:   * Copy the 3 files from `asps.cfg` to `acpi.txt`   * Copy the 3 files from `a2ps-site.cfg` to `adjtime.jpg`   * Copy the 4 files from `a2ps-site.cfg` to `alchemist.jpg` So is there any way to copy a range of files (from filename X to filename Y) into a directory? Like: `cp filenameX ... filenameY destination/`


title: I broke my openbox menu.xml by mistake

text: I'm on a Debian distro, it's been a long time that I edited Openbox menu.xml, so I forgotten that I had to use `obmenu` or whatever, I opened it in a normal text editor, edited something in the right click menu. Then saved then restarted Openbox without reconfiguring it. And now I can still login, after that all I see is a black screen with the mouse cursor. I try opening the terminal using the `super key + t` but I can't see anything at all, no terminal, no web browser, just a cursor and a black screen. Note, I can't boot to live cd, due to nomodeset issue, if nomodeset is on, my PC won't boot correctly, so I always set it to off, but when booting from a live cd, you can't set it to off.


title: Selective dim screens

text: How can I dim only select screens of my multiple-monitor linux system? I have 5 monitors connected to my computer 4 *15 inch and one 27 inch. sometimes i want to use only the main screen (27) and have the rest black or in power save How can i do this? I'm running ubuntu linux 13.10 with kde. To blackout all screens I use `xset dpms force off` but this will be undone as soon as i touch the mouse or keyboard.


title: Using a LVM partition as a Virtualbox drive

text: Is it possible to use a LVM partition as a Virtualbox disk? I can't find any option to use a device as a Virtualbox disk, only disk images.


title: No space on device when removing a file under OpenSolaris

text: While trying to mount a NFS share (exported from an OpenIndiana server) on a client box, the OI server crashed. I got the black screen of death, what looked like a log dump, then the system restated. It never came back up and I get the following error msg after I halt the boot: > `svc.startd[9] Could not log for svc:/network/dns/mulitcast:default: > write(30) failed with No space left on device?` I don't have anything else on the boot drive other than the OS so... I'm not sure what could be filling up the drive? Maybe a log file of some kind? I can't seem to delete anything regardless. It gives me a no space error when I try and delete anything:               $ rm filename     cannot remove 'filename' : No space left on device       I can login into "Maintenance Mode" but not the standard user prompt. The output of `df` is:               rpool/ROOT/openindiana-baseline    4133493    4133493          0    100%   /     swap                              83097900      11028  830386872      1%   /etc/svc/volatile     /usr/lib/libc/libc_hwcap1.so.1     4133493    4133493          0    100%   /lib/libc.so.1      The output of `mount` is:               / on rpool/ROOT/openindiana-baseline read/write/setuid/devices/dev:2d9002 on Wed Dec 31 16:00:00 1969     /devices on /devices read/write/setuid/devices/dev:8b40000 on Fri Jul 8 14:56:54 2011     /dev on /dev read/write/setuid/devices/dev:8b80000 on Fri Jul 8 14:56:54 2011     /system/contract on ctfs read/write/setuid/devices/dev:8c40001 on Fri Jul 8 14:56:54 2011     /proc on proc read/write/setuid/devices/dev:8bc0000 on Fri Jul 8 14:56:54 2011     /etc/mnttab on mnttab read/write/setuid/devices/dev:8c80001 on Fri Jul 8 14:56:54 2011     /etc/svc/volatile on swap read/write/setuid/devices/xattr/dev:8cc0001 on Fri Ju8 14:56:54 2011     /system/object on objfs read/write/setuid/devices/dev:8d00001 on Fri Jul 8 14:6:54 2011     /etc/dfs/sharetab on sharefs read/write/setuid/devices/dev:8d40001 on Fri Jul 14:56:54 2011     /lib/libc.s0.1 on /usr/lib/libc/libc_hucap1.s0.1 read/write/setuid/devices/dev:d90002 on Fri Jul 8 14:57:06 2011       The output of 'zfs list -t all' is:               rpool                                                       36.4G   0       47.5K   /rpool     rpool/ROOT                                                  4.23G   0         31K   legacy     rpool/ROOT/openindiana                                      57.5M   0       3.99G   /     rpool/ROOT/openindiana-baseline                             61K     0       3.94G   /     rpoo1/ROOT/openindiana-system-edge                          4.17G   0       3.98G   /     rpool/ROOT/openindiana-system-edge@install                  19.9M   -       3 38G   -     rpoo1/ROOT/openindiana-system-edge@2011-07-06-20:45:08      73.1M   -       3.57G   -     rpoo1/ROOT/openindiana-system-edge@2011-07-06-20:48:53      75.9M   -       3 82G   -     rpoo1/ROOT/openindiana-system-edge@2011-07-07-02:14:04      61K     -       3.94G   -     rpoo1/ROOT/openindiana-system-edge@2011-07-07-02:15:14      61K     -       3.94G   -     rpoo1/ROOT/openindiana-system-edge@2011-07-07-02:28:14      61K     -       3.94G   -     rpool/ROOT/openindiana-system-stable                        61K     0       3.94G   /     rpoo1/ROOT/pre_first_update_07.06                           108K    0       3 82G   /     rpool/ROOT/pre_second_update_07.06                          90K     0       3.57G   /     rpool/dump                                                  9.07G   0       9.07G   -     rpool/export                                                3.85G   0       32K     /export     rpool/export/home                                           3.85G   0       32K     /export/home     rpool/export/home/admin                                     3.85G   0       3.85G   /export/home/admin     rpool/swap                                                  19.3G   19.1G   126M    -


title: Deleting Lines, which match a particular Identifier from another file

text: I have 2 files. File 1, has an identifier (eg. `D7MHBF:11:1449:1988`) and every new entry starts with `@`. It has few more fields, which are not important in our analysis. File 2 consists of a column of Identifiers. If the Identifier of File 2 is exactly matching with the Identifier of File 1 then, delete the whole three- line entry in File 1.(P.S. Every entry starts with @). **File 1** :               @D7MHBF:11:1449:1988  1:N     NGCCCATTCTATGCAACAAATTCAACAAAGTCTCCCA     +     #1=DDFFDFHHDHIGGFIIIIIIIHHIHIGDGIGGEH     @D7MHBF:11:1681:1959  1:N     NGGTTTAGAGCCTGTATTTTGAACGTAATAGCAGGGT     +     #1=ADDFFHHDDHEHIHJJJICCFHGEIGJGGGIJJF     @D7MHBF:11:1778:1946  1:N     NTGTGGGTTCAACAATGGGCTCATTGCCATCAGCGAG     +     #1=ADDFDHHGHFHGGIIJJJGIIJIFIIJJJIJIIJ     @D7MHBF:11:1854:1955  1:N     NTTGATTGTGCTTCTTATGAGCAAAAATGTTGATGAC     +     #1=DFFFFHHHGHHIJEHIIGGGGIJJJJIHIIHIII     @D7MHBF:11:1903:1972  1:N     NACTACTATACTATGAAGTGGCTATGACAATTGTCTT     +     #1=DFFFFHHHGHHIJEHIIIGGGGIJJJJIHIIHII      **File 2:**               D7MHBF:11:1449:1988     D7MHBF:11:13844:51576     D7MHBF:11:13838:51641     D7MHBF:11:1778:1946     D7MHBF:11:1903:1972                                                                                Expected Output:               @D7MHBF:11:1681:1959  1:N     NGGTTTAGAGCCTGTATTTTGAACGTAATAGCAGGGT     +     #1=ADDFFHHDDHEHIHJJJICCFHGEIGJGGGIJJF     @D7MHBF:11:1854:1955  1:N     NTTGATTGTGCTTCTTATGAGCAAAAATGTTGATGAC     +     #1=DFFFFHHHGHHIJEHIIGGGGIJJJJIHIIHIII      I am new in Bioinformatics and Programming.


title: Using mplayer inside kvm/qemu

text: Is it possible to use mplayer inside kvm/qemu configuration? What video driver should I use? The only driver that worked was `sdl` and it was super slow. EDIT: I just found out that VirtualBox works fine with `gl` driver (when 3D acceleration is turned on).


title: RadioTray error: gstplaysink

text: I installed RadioTray in Lubuntu 12.04 (64bit) and it can't play radio streams. When a stream is started, it throws this notification: > >     > Radio Error gstplaysink.c(1906): gen_audio_chain ():/ >     > GstPlayBin2:player/GstPlaySink:playsink0 >   I can play all those streams from audacious and the browser itself (chrome). I have been playing radio streams (shoutcast) for months and had been using streamtuner2 to find streams (but it has a sorting error that you cannot tell what stream will you end up listening to). I also can watch videos with vlc and in youtube, etc. Maybe it could be some plugins problem, but I can't find any logs.


title: How to host an intranet website inaccessible outside the LAN?

text: I am a Linux/Unix noob, so please bear with me. Here is my situation: I have a server (Debian Squeeze) on a LAN. I have installed Nginx web server on it. The server has Internet access to download and install packages. My question: Can I host a website so that when users on the LAN type:               http://abcd (no .com, .net, etc.)       into their browser, the website opens? Note that they also have full Internet access, so it should not go straight to Google or some other default search engine instead. At the same time, anyone outside the LAN must not be able to access it, no matter what URL they type. Is this possible?


title: How can I get information about my virtual desktops via the command line?

text: I'm curious how I can get information such as the dimensions of my desktop, which desktop is currently active, and what labels (if any) are set for my desktop enviornment (DE).


title: How can I make Debian with KDE louder?

text: I am running KDE in Debian Testing and I just noticed that the system is really quiet. This is my office laptop, so to be honest I turned the sound on for the first time since I got it 2 years ago. The system sound in KMix is 100%, but still pretty much all the sounds are rather quiet. How can I make it louder?


title: curl several files and save output in one file

text: I am using `curl` to grab the HTML of a website. I want to only grab the first 20 lines, and save this in an external file. I need to grab about 10 URLs, and want to save all of them in the same file. Preferably with the URL of each file above the results. What I came up with is: `curl http://example.com/url1 | head -20 && curl http://example.com/url2 | head -20 > exportfile` However, this yields two issues:   * This only saves the latest page (and if I put > exportfile after every statement, it overvwrites the file   * This does not save the actual command in the file Any way to make this work as I intend?


title: recurrent loss of wireless connectivity

text: My wireless connection is frequently terminated (reason unknown). I can remedy the problem either by rebooting or by unloading and reloading the kernel module for my wireless network interface controller (Intel Corporation Centrino Wireless-N 1000 [Condor Peak]). The frequency with which the connection terminates appears to be random, so unloading and reloading the kernel once per minute (cron: `*/1 * * * * modprobe -r iwlagn; modprobe iwlagn; iwconfig`) usually provides uninterrupted connectivity for a period of a few hours. If I recall correctly, this problem occurred shortly after upgrading to multiarch support in Debian 7. Please advise if you know or can suggest a solution.


title: Can you give a user account multiple passwords?

text: I want to assign 2 passwords to a single account. What I want to know is 1) is this possible, and 2) what are the security implications of this? The reason I want to do this is because I'm currently busy with some local testing, and I thought it would be convenient in some specific situations. After some research I found something called PAM, but I'm struggling to find information on how installation / configuration works. I'm running Ubuntu 12.04.


title: unable to establish communication using grabserial

text: I have use teraterm in past and it works fine. I can see log messages coming from my board. Ultimately I reach the login prompt where I enter my login and password for OS running on my board. Now I am trying to do the same using grabserial. But here I reach the login prompt, but after that nothing happens. The password option never comes. And even if I enter password, nothing happens (but my password that I am typing is visible).               grabserial -v -d "/dev/ttyUSB0" -b 115200 -w 8 -p N -s 1 -e 30 -t -m "Starting kernel.*"       Why it is happening. Also I am running the grabserail as a root, and if i don't do this I get permission related error. Why this is happening? **Additionally** I found that in teraterm when I used to see the following message (actually log message from my board):               Hit any key to stop autoboot      Then it counts upto 5 seconds for the user to input a key. It really worked. I was able to stop this autoboot by pressing a key. But in case of grabserial when I see this message and type any key , the character appears on the console, but nothing happens, ultimately it boot in auto after 5 seconds. Both these issues (password option not coming and the above one), indicates that the communication is perhaps only in one direction. My input is not going to the board via grabserial. But it was going through Teraterm when I was using it. Any guess why is this happening ?


title: Could you explain this "chroot" /tmp directory creation?

text: In the following linked article they explain how to create a "chroot" /tmp directory. I'm a bit confused by what they did. Could someone explain what the following commands are doing? **Noexec and /tmp Troubleshooting**               1. # mkdir -p /root/chroot /root/tmp      2. # mount --bind / /root/chroot      3. # mount --bind /root/tmp /root/chroot/tmp     4. # chroot /root/chroot      In the first step, why did they create **/root/tmp** and not **/root/chroot/tmp**? Does the first mount command affects the second one? On the second step they are binding the new directory **/root/chroot** to the root directory. Does that mean that on the third step **/root/tmp** actually points to **/root/chroot/root/tmp** ? Where does **/root/chroot/tmp** comes from? That's the part I'm getting confused. What's the logic behind this?


title: How to tar only files in a multiple of directories but not directory?

text: I have three folders under the Test folder.               Test ----> dir1, dir2, dir3      Under dir1,dir2 and dir3, I have lot of files. I want to tar only the files not the dir1, dir2 and dir3.


title: Where is a shell script run from?

text: I have a shell script in `/usr/bin`. Let's call it `hello`. It contains this:                echo "I am located in $PWD"      echo "I am called from this directory: ???"      Running `hello` from `/home/Documents` I expect the following output:                I am located in /usr/bin      I am called from this directory: /home/Documents      How can I get the directory path where the script is run from?


title: Trigger an init script when a specific device is up and a kernel module has been loaded

text: On my ubuntu 12.04 servers, I need to write an _init.d_ script that waits until the infiniband interface (device: _mlx4_0_ , interface: _ib0_ ) is completely up, and until the _knem_ kernel module is loaded. I have an _init.d_ script that works if I wait that the system is up and manually `service myscript start` but it does not work if I load it normally at boot time. I'm using boot order _99_ , but it does not start correctly because I need it to wait until those features are running. What is the correct syntax in an `init.d` to achieve that (one kernel module and )? I guess there must be some keyword like `# Required-Start: $remote_fs $syslog $network` but I can't find the correct ones for specific interface and kernel modules. EDIT: a) precision: the init script is related to _SLURM_ , _openMPI_ and _infiniband_ interactions. I have compiled _SLURM_ with _Mellanox infiniband driver_ support, and _openMPI_ is linked to this version of SLURM. The result is that openMPI is using directly the mellanox infiniband driver, which is much more powerfull than _ipob_ (ip over inifiniband). To do that, it needs to use the registered memory of the system, which has to be set as _unlimited_. SO: I have added a few `logger` output in my _init.d_ script. I notice that in fact the modules are up and running. So I don't understand fully the problem. It is strange, maybe related to some environment variables needed and that are set up only in a full user space and not at init time. The problem concerns the memlock limits set in _/etc/security/limits.conf_. To make it work I had to set               *             -   memlock       unlimited     root          -   memlock       unlimited      and in this way, when I launch the slurm deamon with an _ssh_ connection everything works, and when it is the init process that starts the deamon, it is like it does not consider the rules in _/etc/security/limits.conf_.


title: systemd mount volume using device symlink

text: I'm trying to have systemd mount a volume by symlink. Unfortunately when I try it times out waiting for the systemd device to show up.               # systemctl start mnt-ephemeral0.mount     A dependency job for mnt-ephemeral0.mount failed. See 'journalctl -xn' for details.          # journalctl -xn     Aug 04 17:02:09 i-c7a88499 systemd[1]: Expecting device dev-block-ec2-ephemeral0.device...     Aug 04 17:03:39 i-c7a88499 systemd[1]: Job dev-block-ec2-ephemeral0.device/start timed out.     Aug 04 17:03:39 i-c7a88499 systemd[1]: Timed out waiting for device dev-block-ec2-ephemeral0.device.     Aug 04 17:03:39 i-c7a88499 systemd[1]: Dependency failed for /mnt/ephemeral0.      The message says it's waiting for `dev-block-ec2-ephemeral0.device`. My unit file specifies `What=/dev/block/ec2/ephemeral0`, which is a symlink to `/dev/xvdb`. `man 5 systemd.device` says: > systemd will dynamically create device units for all kernel devices that are > marked with the "systemd" udev tag However it appears to only create the device unit for the `/sys` path.               # systemctl list-units | grep 'xvdb\|ephemeral0'     sys-devices-vbd\x2d2064-block-xvdb.device                  loaded active plugged   /sys/devices/vbd-2064/block/xvdb      The `ephemeral0` is a properly recognized udev symlink:               # udevadm info -q symlink -n /dev/xvdb      block/ec2/ephemeral0 disk/by-uuid/d57e2dd9-0062-448c-a914-0b6df045dafb          # ls -l /dev/block/ec2/ephemeral0      lrwxrwxrwx 1 root root 10 Aug  4 16:59 /dev/block/ec2/ephemeral0 -> ../../xvdb      Here is the current unit file:               [Unit]     After=ephemeral0-format.service     [Mount]     What=/dev/block/ec2/ephemeral0     Where=/mnt/ephemeral0      Is there any way to get this mounted through a systemd.mount unit?   Could I create a fake unit like systemd did for that `sys-devices-vbd...` one?


title: What is the purpose of abstractions, session, session leader and process groups?

text: I understand from Informit article that sessions and process groups are used to terminate descendant processes on exit and send signals to related processes with job control. I believe this information can be extracted at any point using the PPID of every process. Do these concepts exist in place just to have a data structure that enables getting descendants of a process quickly? Do session and process groups get employed in things other than job control and termination of descendants? do they store any context information? Any good references will be helpful.


title: Why can't I use the REJECT policy on my iptables OUTPUT chain?

text: I currently have my OUTPUT chain set to DROP. I'd like to change it to REJECT, so that I have a clue that it's my firewall stopping me from getting somewhere rather than a problem with whatever service I'm attempting to access (immediate reject instead of timing out). However, iptables doesn't seem to care for this. If I manually edit my saved rules file and try to restore it, I get `iptables-restore v1.4.15: Can't set policy 'REJECT' on 'OUTPUT' line 22: Bad policy name` and it refuses to load the rules. If I attempt to set this manually (`iptables -P OUTPUT REJECT`), I get `iptables: Bad policy name. Run 'dmesg' for more information.` but there's no output in dmesg. I've confirmed the appropriate rule is compiled into the kernel and I've rebooted to ensure it's loaded:               # CONFIG_IP_NF_MATCH_TTL is not set     CONFIG_IP_NF_FILTER=y     ***     CONFIG_IP_NF_TARGET_REJECT=y     ***     CONFIG_IP_NF_TARGET_LOG=y     CONFIG_IP_NF_TARGET_ULOG=y      (Asterisks added to highlight applicable rule) Everything I can find states that REJECT is a valid policy/target (in general), but I can't find anything that says it's not valid for the INPUT, FORWARD, or OUTPUT chains. My Google-fu isn't helping. I'm on Gentoo, if that makes any difference. Anyone here have any insight?


title: Debian USB automount

text: Got my USB flash automount broken after reboot. Using Debian 6, GNOME 2 My NTFS hard disk is still mounting correctly. When i connect my Android smartphone (with SD and local drive) my messages log looks like: **tail -f /var/log/messages**               Aug 21 11:46:14 pp-hideout kernel: [  139.461734] sd 4:0:0:0: [sdc] Attached SCSI removable disk     Aug 21 11:46:14 pp-hideout kernel: [  139.466484] sd 4:0:0:2: [sdd] Attached SCSI removable disk     Aug 21 11:46:14 pp-hideout kernel: [  139.514664] cdrom: This disc doesn't have any tracks I recognize!     Aug 21 11:46:22 pp-hideout kernel: [  148.005560] sd 4:0:0:2: [sdd] 4268032 512-byte logical blocks: (2.18 GB/2.03 GiB)     Aug 21 11:46:22 pp-hideout kernel: [  148.006180] sd 4:0:0:0: [sdc] 7761920 512-byte logical blocks: (3.97 GB/3.70 GiB)     Aug 21 11:46:22 pp-hideout kernel: [  148.010305]  sdd:     Aug 21 11:46:22 pp-hideout kernel: [  148.010679]  sdc:     Aug 21 11:46:22 pp-hideout kernel: [  148.014944]  sdc1     Aug 21 11:46:22 pp-hideout halevt: Running: halevt-mount -u /org/freedesktop/Hal/devices/volume_uuid_DACE_470F -o sync -m 002 -o gid=plugdev     Aug 21 11:46:23 pp-hideout halevt: Running: halevt-mount -u /org/freedesktop/Hal/devices/volume_uuid_3E19_07CA -o sync -m 002 -o gid=plugdev      So the problem is somewhere on software level. And the problem is I want it to automount, but it isn't working. Can anybody help? p.s.: How do Debian USB automounting is working "from the box"? Where can i read about it? **UPDATE:** Did some apt-get ideas from web and now I have:               Running: halevt-mount -u /org/freedesktop/Hal/devices/volume_uuid_DACE_470F -o sync -m 002 -o gid=plugdev     Aug 22 03:06:05 pp-hideout usbmount[15471]: executing command: mount -tvfat -osync,noexec,nodev,noatime,nodiratime /dev/sdc1 /media/usb0     Aug 22 03:06:05 pp-hideout halevt: Running: halevt-mount -s     Aug 22 03:06:05 pp-hideout usbmount[15471]: executing command: run-parts /etc/usbmount/mount.d     Aug 22 03:06:07 pp-hideout usbmount[15436]: executing command: mount -tvfat -osync,noexec,nodev,noatime,nodiratime /dev/sdd /media/usb1     Aug 22 03:06:07 pp-hideout halevt: Running: halevt-mount -s     Aug 22 03:06:07 pp-hideout usbmount[15436]: executing command: run-parts /etc/usbmount/mount.d      Now USB flash mounts, BUT read-only. How can I fix read-only? Any ideas?


title: chcon fails to fix "cannot enable executable stack as shared object requires" err under RHEL6

text: I have an application I test at work, that has always failed installation on systems with SELinux enabled. Our published workaround involves issuing a chcon command for the library-file at the center of the failure.               chcon -t textrel_shlib_t /usr/lib/ourfile.so.1.0.20      In RHEL5, this has worked for us, and allows the application to function correctly, without having to completely disable SELinux. Under RHEL6, the chcon command gives no errors, but we still see the same error, when our application is started as a daemon, via `/etc/init.d/ourapp` My primary concern is figuring out an updated workaround (the application library in question is submitted to an external certification process, and can't be changed for another 6 months), but I'm also curious if this indicates an intentional change from RHEL5 to RHEL6.


title: %post section of rpmbuild not interactive

text: **Situation:** I'm trying to build a custom rpm to place a config file in a particular location. The installation completes fine by placing config files in proper directories but the %post section is not working. This section echoes user to make an input and 'reads' it. This read value is to be placed in those config files with help of 'sed'. **Issue:** 'read' is not working in the %post section ie. the installation process does not wait for user to provide input. It basically completes the installation by placing files in the directories. In short, the %post section is not being interactive for user to provide input. Please see the SPEC file here: http://pastebin.com/5BgkJUpG . This will help to get the idea. I wrote the exact same lines of %post section above for "postint" section while building a .deb package and it worked fine there. User installing the deb package was able to make the input and this given value was placed in the config file with 'sed'.


title: Accessing ssh proxy from another host

text: I'm used to setup a ssh proxy in the localhost like this:               ssh -fND 9999 server      I have been using it for years for daily browsing. Now I want to use the same proxy in a Windows guest in the same desktop host. The host (Fedora) is at 10.1.1.4 and the guest is at 10.1.1.7. But when I set the proxy as a socks5 proxy in Firefox at the Windows guest pointing it to 10.1.1.4:9999 it times out. I did open the 9999 port at the firewall. The same thing happens when setting the proxy up in another host (Centos 6) and trying to access it from my Fedora desktop. So what am I missing?


title: How to fix flash fullscreen from appearing on the side of the screen

text: My situation is similar to the one described in How can I make flash fullscreen on an external display. I also have a laptop extended with a larger screen. Aside from KDE wildly resetting the screens relative positions (the xrandr's `\--left-of`) every time I reboot (curiously enough, it remembers which screen is the main one), which I managed to override with putting small xrandr's command in `.xsession`, I have a bigger problem. Whenever I want some flash app to go fullscreen, it appears on the right side of the current screen (i.e. the one on which I clicked some flash fullscreen button). Always the right side, no matter which screen is _left of_ the other one. The other side of the screen is black and also the other screen is unaffected in any way. I would think it's just flash but fullscreen worked perfectly on the same setting with XFCE. Is there any known solution to this situation?


title: Efficient mechanism to determine if open file has been externally modified?

text: For example, the IDE I'm using at the moment (Aptana Studio) notifies me as soon as a file's contents it has open have been changed by some external program. I can imagine having a periodic loop run stat() on a file and check the time of last data modification. Is this how it's normally done or is there a blocking interrupt-like mechanism used instead?


title: XOR of a shell variable and a binary file

text: I have a password stored in a shell variable (which was read from command line input). I also have a keyfile stored in a file (which was created using `dd` and `/dev/urandom`). Since I want to require both of those to decrypt my hard drive, I would like to XOR them, store it in a file and use that as key. I would therefore like to know what the simplest way of doing that would be. `xxd` would be a perfect fit if it allowed `-b` and `-p` at the same time but apparently, it doesn't... * * * Edit: I'll use it in https://github.com/xavierm02/combine-keys


title: German umlaut on Danish keyboard

text: I use standard Danish QWERTY keyboard (on Debian, if the distro matters). Is it at all possible to write German umlauts such as Ä, Ö, Ü by some key combos (that is without changing the layout to German)?


title: Looking for an 'all in one' application with a script panel and a console

text: I'm quite impress with Windows Powershell ISE. Here is a nice video. ISE stands for 'Integrated Scripting Environment' and it's an application that has a panel at the top for scripting and a panel at the bottom with a console. I think it's a great idea! Within the same application, it is possible to use the console as usual, but also you'd have one or multiple script panels at the top where you can write and execute scripts directly. Also it's possible to execute only highlighted sections of the code. So I was thinking, how cool would it be to have something like this in my favourite Linux machine using bash! Has anyone know about something similar for Linux?


title: Force getaddrinfo to use IPv4

text: The man page says: > The getaddrinfo(3) function is not limited to creating IPv4 socket address > structures; IPv6 socket address structures can be created if IPv6 support is > available. These socket address structures can be used directly by bind(2) > or connect(2), to prepare a client or a server socket. What should I do to force `getaddrinfo` to _not_ create IPv6 socket address structures?


title: Solaris 11: how to get pkg properties in machine readable format

text: I would like to be able to extract (from within a shell script) the attributes of an IPS package. Basically I'm after exact same information as is listed with the `pkg info` command, but unfortunately this command list information in a format which is not very friendly to read from within a script. Example below:               $ pkg info archiver/gnu-tar               Name: archiver/gnu-tar            Summary: GNU version of the tar archiving utility        Description: Tar is a program for packaging a set of files as a single                     archive in tar format.           Category: Development/GNU              State: Installed          Publisher: solaris            Version: 1.26      Build Release: 5.11             Branch: 0.175.0.0.0.2.537     Packaging Date: October 19, 2011 09:11:16 AM               Size: 1.73 MB               FMRI: pkg://solaris/archiver/gnu-tar@1.26,5.11-0.175.0.0.0.2.537:20111019T091116Z      I was hoping for something like `pkg get-property pkg.summary archiver/gnu- tar` to be available as a command but can't find such command. I would really hate to try to parse the above output. Secondly the man pages clearly states that the output from `pkg info` is intended to be read by humans, not machines.


title: Capture and broadcast video from web cam

text: I have server on Debian 6, without Desktop Environment and I have simple web camera. Web camera is defined like `/dev/video0`, so I can use `cat /dev/video0 > ~/photo` to get image from it (of course this is not correct way :)) I want to capture, convert and broadcast video stream by HTTP, or can I make common IP web cam?


title: Is it possible the get the original (best) audio quality when using avconv?

text: In Feb 2011 I had a similar question: ffmpeg and libmp3lame produces bad audio quality? Now I'd like to know if it is possible to the get the original audio quality from a (flash) video? Every time I convert a video, the quality is worse than the original quality, not much worse but you can hear the difference. These are my attempts:                  avconv -i ~/"$2.flv" -acodec libmp3lame -c:v libx264 -qscale 1 -aq 1 -q 1 -vol 100 -ab 196608 ~/"$2.avi"      I tried to use the best quality -qscale 1, aq 1 and so on. I even tried to use **-same_quant** , I already tried **-codec copy** , shown in this thread, but then the quality is not better but even worse and I don't see any video then. Is there a way to achieve that? By the way, I don't care about the output format. **UPDATE**   I made some test by downloading a video from YT and listen to it both on YT and on my local machine. I didn't convert the video, I just listened to a flv file itself and determined that the local quality is even worse than the file on YT. So I'm not sure if this is really an avconv problem. I wonder where this quality difference between the stream from YT and the downloaded file from TY come from. Any ideas?