Unattended remote GUI access for linux applicance

What I'm not looking for is just a VNC-type ability to get the GUI for a remote machine. I need to be able to view and control what's actually going on on the screen of a remote linux appliance. I'm looking for something like TeamViewer Host for a bunch of linux machines that are going to be kiosks/digital signage, running a graphics-based kiosk style of desktop application; but I need to be able to see whats going on on them, remotely. Unfortunately TeamViewer doesn't currently have a "host" application for Linux. Requirements:   * Remote view and control of the desktop, including being able to see and control exactly what is currently being displayed on the monitor.   * Reboot-tolerant, requires no direct access to the computer, ever, once it has been setup, and ideally can be set up remotely via SSH or other remote tunnel. Preferences:   * Be able to remote access from Mac or Windows    * User friendly enough to initiate and use for low level customer support folks (low linux IQ) to access once it has been installed. I'm open to either commercial or open source projects, free-er and cheaper is better, but I need a high level of user-friendliness and stability. Haven't settled on a Distro for the platform yet, although i'm assuming we'll go with Ubuntu unless something (like this) pushes us in another direction.


Log from oom killer

I'm running a virtual machine at a provider where you pay for everything you use (CPU, memory, disk IO, bandwidth, etc). Currently my machine has 512MB ram and 1GB swap area. The kernel version is 3.8.0-21 and the distribution is Ubuntu 13.04 but I suspect the kernel may be custom made, because kernel updates are held back. I run a few cron jobs where Python processes are doing things with a PostgreSQL database. Lately the Python processes have been killed by the OOM killer. I don't need help in solving the actual problem, I can increase the memory, reschedule the cron jobs, turn off overcommitting of memory, tune the PostgreŚQL settings, change how the Python programs work, but first I would like to know exactly why this happens (to make the correct fix). The thing is that I have plenty of swap free at the time of the kill but no physical memory. I have the following in the kernel log:               [4003981.650341] select 1 (init), adj 0, size 249, to kill     [4003981.650349] select 609 (rsyslogd), adj 0, size 609, to kill     [4003981.650359] select 17139 (postgres), adj 0, size 635, to kill     [4003981.650361] select 10381 (postgres), adj 0, size 6719, to kill     [4003981.650365] select 14153 (postgres), adj 0, size 7296, to kill     [4003981.650367] select 14159 (postgres), adj 0, size 7300, to kill     [4003981.650370] select 26802 (python3), adj 0, size 70767, to kill     [4003981.650372] send sigkill to 26802 (python3), adj 0, size 70767      I run `wmstat` every second around the same time (the Python process was killed right before 12:13:48):               2014-02-01 12:13:43 procs -----------memory---------- ---swap-- -----io---- -system-- ----cpu----     2014-02-01 12:13:43  r  b   swpd   free  inact active   si   so    bi    bo   in   cs us sy id wa     2014-02-01 12:13:43  1  0     55      5    216    217    0    0   964   396  386  514 71 10  0 18     2014-02-01 12:13:44  1  1     55     87    185    166    0    0 22304 14536  907 1241 53  9  0 38     2014-02-01 12:13:45  1  0     55     60    190    189    0    0 21768 17344 1216 4581 21 26  0 53     2014-02-01 12:13:46  1  1     57      6    218    214    0    0 22264  4836 1031 3696 22 43  0 35     2014-02-01 12:13:47  2  1     59      4    217    218    0    0 28228 29892 1045 6234 22 34  0 44     2014-02-01 12:13:48  1  2     73    272     97     74    0    0 39436 14372  975 3708 10 38  0 52     2014-02-01 12:13:49  1  0     73    185    173     85    0    0 78400   356 1154 1943 23 33  0 44     2014-02-01 12:13:51  1  1     73    247    132     65    0    0  1936     0  165  188  7 13 69 11      Now to the actual question: I have seen other questions here (like this), where there is a log with more details about the memory (DMA, Normal memory, etc). I can't seem to find it anywhere on my system. It is something that needs to be turned on or where can I find it? The information I'm looking for looks something like this:               Free pages:        6524kB (0kB HighMem)     Active:20 inactive:23 dirty:0 writeback:0 unstable:0 free:1631 slab:874 mapped:20 pagetables:90     DMA free:6524kB min:1200kB low:1500kB high:1800kB active:80kB inactive:92kB present:16384kB pages_scanned:41 all_unreclaimable? no     lowmem_reserve[]: 0 0 0     Normal free:0kB min:0kB low:0kB high:0kB active:0kB inactive:0kB present:0kB pages_scanned:0 all_unreclaimable? no     lowmem_reserve[]: 0 0 0     HighMem free:0kB min:128kB low:160kB high:192kB active:0kB inactive:0kB present:0kB pages_scanned:0 all_unreclaimable? no     lowmem_reserve[]: 0 0 0     DMA: 411*4kB 252*8kB 113*16kB 27*32kB 1*64kB 1*128kB 0*256kB 0*512kB 0*1024kB 0*2048kB 0*4096kB = 6524kB     Normal: empty     HighMem: empty     Swap cache: add 24282, delete 24269, find 7705/11790, race 0+0     Free swap  = 124768kB     Total swap = 128448kB     Out of Memory: Killed process 453 (smbd).


Recently installed applications missing from $PATH

When I install apps using `apt-get` or `NVM` or `NPM` on Ubuntu, I can type the command and it works. Then I log out of the shell and log back in. Now none of the things I installed work when I ask for them because they are apparently not on my `$PATH`. How can I ensure that whatever apps I install are always added to my `$PATH` automatically?


How to set up AMD Cayman/Antilles HDMI Audio (Radeon HD 6900 series)?

I've got an AMD Radeon HD 6950 card:               $ lspci | grep AMD     03:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Cayman PRO [Radeon HD 6950]     03:00.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Cayman/Antilles HDMI Audio [Radeon HD 6900 Series]      HDMI audio is supported on kernel 3.5 and higher, which I have:               $ uname -r     3.12.9-2-ARCH      I've installed the latest version of the (hopefully) relevant packages:   * alsa-lib 1.0.27.2-1   * alsa-plugins 1.0.27-2   * alsa-utils 1.0.27.2-1   * ati-dri 10.0.2-1   * lib32-alsa-lib 1.0.27.2-1   * lib32-ati-dri 10.0.2-1   * xf86-video-ati 1:7.3.0-1 ALSA detects the sound card:               $ aplay -l | grep HDMI     card 2: Generic [HD-Audio Generic], device 3: HDMI 0 [HDMI 0]      I've enabled the kernel module:               $ sudo grep -F radeon.audio /boot/grub/grub.cfg         linux /boot/vmlinuz-linux root=UUID=... rw  quiet radeon.audio=1         linux /boot/vmlinuz-linux root=UUID=... rw  quiet radeon.audio=1             linux   /boot/vmlinuz-linux root=UUID=... rw  quiet radeon.audio=1                     linux   /boot/vmlinuz-linux root=UUID=... rw  quiet radeon.audio=1      I've enabled the only channel that is available for the card:               $ amixer --card 2      Simple mixer control 'IEC958',0       Capabilities: pswitch pswitch-joined       Playback channels: Mono       Mono: Playback [on]      However, my receiver insists there is no signal when I try to play something:               $ speaker-test --device plughw:2,3          speaker-test 1.0.27.2          Playback device is plughw:2,3     Stream parameters are 48000Hz, S16_LE, 1 channels     Using 16 octaves of pink noise     Rate set to 48000Hz (requested 48000Hz)     Buffer size range from 64 to 1048576     Period size range from 32 to 524288     Using max buffer size 1048576     Periods = 4     was set period_size = 262144     was set buffer_size = 1048576      0 - Front Left     Time per period = 5.473506      I also tried changing from S/PDIF output (which works) to HDMI in VLC, with the same result - the player doesn't complain, the receiver detects that it's connected via HDMI, but it insists there is no signal. And finally, I tried rebooting after writing this up. No changes. Is ALSA correctly detecting the card? Do I need any other packages? Other kernel settings?


What did `uniq -t` do?

I have some old code from 2003 which uses `-t` option for `uniq` command. It throws an error since that option is probably not supported anymore. Here's the piece which uses the command:               egrep -n "{ IA32_OP" ia32-decode.c | \         awk '{ print $1 $3 $4 }' | \         sort -t '(' +1 | \         uniq -t ':' -f 1 | \         sed 's/\(.*\)\:IA32_OP(\(.*\)),/#define IA32_OP_\2 \1/g' >> ia32_opcodes.h      What did that option do back then? What can I substitute that command with?


debian not accepting administrative password

I have XFCE Debian on an old PowerPC PowerBook G4. When I go to open Synaptic Package Manager, a window pops up asking for my administrative password. I enter the password I normally use for sudo in Terminal, but it doesn't work. I enter nothing, but it doesn't work. I try various other ones - like 'debian', 'synaptic' and 'password', but that doesn't work either. Why doesn't it work?


Can't resolve CentOS 6.2 server by name from OS X

I just set up a new AirPort Extreme and CentOS 6.2 server - the server is meant to be a general-purpose storage machine, and so I've set up Samba and Avahi on it. I can easily access the server by IP address from my MacBook Pro running OS X Lion, but attempting to resolve it by name - from the terminal with `ping`, in a connect prompt (`smb://my-server/`) - doesn't work. Are there any particular configuration steps I need to take? How can I get access by name to the server from OS X?


Terminal does not open under dwm -- is there an error log file?

I am running DWM under Arch Linux in combination with the urxvt terminal. I have a urxvt daemon running but when I press the key combination for opening a terminal window, nothing happens. Is there an error log file for DWM? Any suggestions what I can do to find out why no terminal is opening? Thanks! Edit: My config.c file:               /* appearance */     static const char font[]            = "-*-terminus-medium-r-normal-*- 12-*-*-*-*-*-*-*";     static const char normbordercolor[] = "#000000";     static const char normbgcolor[]     = "#3f3f3f";     static const char normfgcolor[]     = "#dfaf8f";     static const char selbordercolor[]  = "#cc0000";     static const char selbgcolor[]      = "#2b2b2b";     static const char selfgcolor[]      = "#f0dfaf";     static const unsigned int borderpx  = 1;        /* border pixel of windows */     static const unsigned int snap      = 0;       /* snap pixel */     static const Bool showbar           = True;     /* False means no bar */     static const Bool topbar            = True;     /* False means bottom bar */          /* tagging */     static const char *tags[] = { "term", "work", "www", "mail"};          static const Rule rules[] = {     /* class      instance    title       tags mask     isfloating   monitor */     { "Gimp",     NULL,       NULL,       0,            True,        -1 },     { "Firefox",  NULL,       NULL,       1 << 8,       False,       -1 },     };          /* layout(s) */     static const float mfact      = 0.55; /* factor of master area size  [0.05..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 */          static const Layout layouts[] = {     /* symbol     arrange function */     { "[]=",      tile },    /* first entry is default */     { "><>",      NULL },    /* no layout function means floating behavior */     { "[M]",      monocle },     };          /* key definitions */     #define MODKEY 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 const char *dmenucmd[] = { "dmenu_run", "-fn", font, "-nb", normbgcolor, "-nf", normfgcolor, "-sb", selbgcolor, "-sf", selfgcolor, NULL };     static const char *termcmd[]  = { "urxvtc", NULL };          static Key keys[] = {     /* modifier                     key        function        argument */     { MODKEY,                       XK_p,      spawn,          {.v = dmenucmd } },     { MODKEY|ShiftMask,             XK_Return, spawn,          {.v = termcmd } },     { MODKEY,                       XK_b,      togglebar,      {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_l,      setmfact,       {.f = +0.05} },     { MODKEY,                       XK_Return, zoom,           {0} },     { MODKEY,                       XK_Tab,    view,           {0} },     { MODKEY|ShiftMask,             XK_c,      killclient,     {0} },     { MODKEY,                       XK_t,      setlayout,      {.v = &layouts[0]} },     { MODKEY,                       XK_f,      setlayout,      {.v = &layouts[1]} },     { MODKEY,                       XK_m,      setlayout,      {.v = &layouts[2]} },     { MODKEY,                       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 } },     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[2]} },     { 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} },     };


Which command to force a drive to spin up?

I've looked through the manual for `hdparm`, `sdparm`. I know there are arguments to spin **down** the drive, with `-y` and `-Y`. I also know there are arguments to control the power saving features, such as `-S` and `-B`. However what I want is to start the motor and spin **up** the drive. ### sdparm I see sdparm's manual page has `load` and `start` parameters. Can either of these be used? It seems more like something appropriate for a tape drive, or at beast an optical drive? ### dd `dd if=/dev/hdX of=/dev/null count=512` seems the best answer according to What command do I use to spin up a "power up in standby" drive? However, when this is already in the cache, then the drive will not spin up. It seems strange there is no command to explicitly tell the device to start the motor/spin up. What is the best way to spin up SATA HDDs in GNU/Linux?


How to find system call implementations in Linux/Android 2.6.29?

> **Possible Duplicate:**   >  Understanding the Linux kernel source I want to modify some system calls for tracing purposes. To be specific, whenever a system call `open` is made, I want to print some messages. I have been looking into the internet and the code and I found `open.c` in `kernel/goldfish/fs/` directory. And there are many functions in this file. How would I know which function is being called exactly. I could have written some `printk` call in all these functions to find it but I have to do it for other system calls also. So, I have a few questions, 1) What is the best way to find implementation details of system calls? 2) I am using Kernel 2.6.29 (goldfish-Android). Are system calls implementation different in different kernel versions? 3) `strace` tells me that `msgget` ,`msgrecv` and 'SYS_24' system calls are being made. I look into `Android/bionic/libc/SYSCALLS.txt` file and msgget is not there. But when I look into `android/bionic/libc/kernel/arch-arm/asm/unistd.h` file, I can find `msgget` there. I can't understand what's going on and then how can I find implementation for `msgget` ? Thanks.


Linux source, where are sys_umount and sys_mount system calls?

> **Possible Duplicate:**   >  Understanding the linux kernel source I am **sure** that I must be missing something, here. I cannot for the life of me find the source code for these system calls. I can find their numbers, and I can find their prototypes, but I cannot seem to actually find the functions that implement them. In case anyone's interested: the reason that I am trying to find them is so that I can debug a problem with the kernel's floppy driver and/or my floppy drive itself. I can dd to/from it just fine. The drive works in DOS and Windows just fine. But when I mount a disk (any disk, doesn't matter what), the disk is mounted for approximately 1/10 of a second and then automatically unmounted. I am trying to find out why and if there is a way that I can patch my kernel locally to work around it. I know, I know, nobody uses floppies anymore. But I guess I am a nobody. :)


passwordless ssh for another username?

I want to do a passwordless ssh connection for a subversion project. Right now I'm using ssh+svn, and it's a little annoying, because I have to type the password any time I want to transact with the server. I've found several tutorials on the web about how to generate a key for passwordless ssh, but they all seem to assume that I'm using the same username on the remote system as I am for my home system. However, the username that I use for ssh+svn is different that the user account name on the system that I'm running. How do I set this up properly? I haven't had luck with just changing the name in the key file.


sudo hangs when run on remote host over ssh in a script without tty (-t)

I have an AIX 6.1 server where I need to run a remote `sudo` command in a bash script. Here is my bash script simplified: **testSudo.sh**               #!/usr/bin/bash     set -x          sudo env      I can run the `sudo` command locally without password:               [user@server]$ sudo env     VAR=VAL     ...      I can run the script locally:               [user@server]$ /tmp/testSudo.sh     + sudo env     VAR=VAL     ...      I can run `sudo` on the remote host:               [user@client]$ ssh user@server sudo env     VAR=VAL     ...      I can run the script on the remote host with tty:               [user@client]$ ssh -t user@server /tmp/testSudo.sh     + sudo env     VAR=VAL     ...      I cant run the script on the remote host without tty (and I cant add the -t option in my context):               [user@client]$ ssh user@server /tmp/testSudo.sh     + sudo env      It hangs there.


prevent trap from altering underscore variable $_

I have the following code in my bashrc to get the execution time of the last command from http://stackoverflow.com/a/1862762               function timer_start {       timer=${timer:-$SECONDS}     }          function timer_stop {       timer_show=$(($SECONDS - $timer))       unset timer     }          trap 'timer_start' DEBUG     PROMPT_COMMAND=timer_stop          PS1='[last: ${timer_show}s][\w]$ '      but when I run `echo $_` it shows "timer_start" instead of the last commands parameter. How can I change this to preserve the `$_` variable?


Parse XML to get node value in bash script?

I would like to know how I can get the value of a node with the following paths:               config/global/resources/default_setup/connection/host     config/global/resources/default_setup/connection/username     config/global/resources/default_setup/connection/password     config/global/resources/default_setup/connection/dbname      from the following XML:               <?xml version="1.0"?>     <config>         <global>             <install>                 <date><![CDATA[Tue, 11 Dec 2012 12:31:25 +0000]]></date>             </install>             <crypt>                 <key><![CDATA[70e75d7969b900b696785f2f81ecb430]]></key>             </crypt>             <disable_local_modules>false</disable_local_modules>             <resources>                 <db>                     <table_prefix><![CDATA[]]></table_prefix>                 </db>                 <default_setup>                     <connection>                         <host><![CDATA[localhost]]></host>                         <username><![CDATA[root]]></username>                         <password><![CDATA[pass123]]></password>                         <dbname><![CDATA[testdb]]></dbname>                         <initStatements><![CDATA[SET NAMES utf8]]></initStatements>                         <model><![CDATA[mysql4]]></model>                         <type><![CDATA[pdo_mysql]]></type>                         <pdoType><![CDATA[]]></pdoType>                         <active>1</active>                     </connection>                 </default_setup>             </resources>             <session_save><![CDATA[files]]></session_save>         </global>         <admin>             <routers>                 <adminhtml>                     <args>                         <frontName><![CDATA[admin]]></frontName>                     </args>                 </adminhtml>             </routers>         </admin>     </config>      Also I want to assign that value to the variable for further use. Let me know your idea.


How to colorize text in emacs?

I want to view (and/or edit) colorized text in emacs, such as is output by `ls -l --color=always`, `tree...`, or whatever. The text I refer to exists in a file. When I open that file in emacs, I want to be able to see it colorized, or toggle it to show ANSI (SGR) escape sequences. `ansi-color.el` _seems_ be be what I need, but I haven't been able to get it to do any colorizing of the ANSi escape **sequences** , but I do see blue-bold for individual **contol bytes** (eg. `^A` and `^[`)... I'm not sure if that is a feature of `ansi-color`, but I think it is. According to the ansi-color.el comments, it can work with strings and regions, but even that doesn't seem to work.. For example the function `ansi-color- apply-on-region` is not recognized by `M-x`. It says, "No match" I've added `(require 'ansi-color)` to my _.emacs_ file and even `(add-hook 'shell-mode-hook 'ansi-color-for-comint-mode-on)`. I get no error or warning when emacs starts, so I'm stuck. How can I get the standard functions to work, and can it be made to automatically apply when opening a file whose name is suffixed with `.col`?


Unable to ping the IP during first boot

I am trying to add some routes in /etc/init.d/S98 script but it is failing to ping the gateway IP and hence route addition is failing. But once all the S98 scripts are executed I am able to ping the IP and add the routes. Below are the logs captured during S98 script execution. Could you please help me in understanding if I am missing something during init script (/etc/rc3.d/S98) execution.               PING 27.190.35.1 (27.190.35.1) from 27.190.35.171 bond0.3: 56(84) bytes of data.     From 27.190.35.171 icmp_seq=1 Destination Host Unreachable     From 27.190.35.171 icmp_seq=2 Destination Host Unreachable     From 27.190.35.171 icmp_seq=3 Destination Host Unreachable          # ifconfig      bond0     Link encap:Ethernet  HWaddr B4:B5:2F:59:FF:E8               inet addr:192.168.1.1  Bcast:192.168.1.255  Mask:255.255.240.0               UP BROADCAST RUNNING MASTER MULTICAST  MTU:9000  Metric:1               RX packets:446 errors:0 dropped:0 overruns:0 frame:0               TX packets:290 errors:0 dropped:0 overruns:0 carrier:0               collisions:0 txqueuelen:10000               RX bytes:51268 (50.0 KiB)  TX bytes:42174 (41.1 KiB)          bond0.2   Link encap:Ethernet  HWaddr B4:B5:2F:59:FF:E8               inet addr:10.63.73.16  Bcast:10.63.73.127  Mask:255.255.255.128               UP BROADCAST RUNNING MASTER MULTICAST  MTU:1500  Metric:1               RX packets:45 errors:0 dropped:0 overruns:0 frame:0               TX packets:49 errors:0 dropped:0 overruns:0 carrier:0               collisions:0 txqueuelen:10000               RX bytes:2070 (2.0 KiB)  TX bytes:2058 (2.0 KiB)          bond0.2:1 Link encap:Ethernet  HWaddr B4:B5:2F:59:FF:E8               inet addr:10.63.73.5  Bcast:10.63.73.127  Mask:255.255.255.128               UP BROADCAST RUNNING MASTER MULTICAST  MTU:1500  Metric:1          bond0.3   Link encap:Ethernet  HWaddr B4:B5:2F:59:FF:E8               inet addr:27.190.35.171  Bcast:27.190.35.255  Mask:255.255.255.0               UP BROADCAST RUNNING MASTER MULTICAST  MTU:1500  Metric:1               RX packets:39 errors:0 dropped:0 overruns:0 frame:0               TX packets:40 errors:0 dropped:0 overruns:0 carrier:0               collisions:0 txqueuelen:10000               RX bytes:1794 (1.7 KiB)  TX bytes:1680 (1.6 KiB)          bond0.3:1 Link encap:Ethernet  HWaddr B4:B5:2F:59:FF:E8               inet addr:27.190.35.170  Bcast:27.190.35.255  Mask:255.255.255.0               UP BROADCAST RUNNING MASTER MULTICAST  MTU:1500  Metric:1          bond0:1   Link encap:Ethernet  HWaddr B4:B5:2F:59:FF:E8               inet addr:192.168.1.30  Bcast:192.168.15.255  Mask:255.255.240.0               UP BROADCAST RUNNING MASTER MULTICAST  MTU:9000  Metric:1          eth0      Link encap:Ethernet  HWaddr B4:B5:2F:59:FF:E8               UP BROADCAST RUNNING SLAVE MULTICAST  MTU:9000  Metric:1               RX packets:304 errors:0 dropped:0 overruns:0 frame:0               TX packets:272 errors:0 dropped:0 overruns:0 carrier:0               collisions:0 txqueuelen:10000               RX bytes:35698 (34.8 KiB)  TX bytes:39596 (38.6 KiB)               Interrupt:32 Memory:f6000000-f67fffff          eth1      Link encap:Ethernet  HWaddr B4:B5:2F:59:FF:E8               UP BROADCAST RUNNING SLAVE MULTICAST  MTU:9000  Metric:1               RX packets:142 errors:0 dropped:0 overruns:0 frame:0               TX packets:18 errors:0 dropped:0 overruns:0 carrier:0               collisions:0 txqueuelen:10000               RX bytes:15570 (15.2 KiB)  TX bytes:2578 (2.5 KiB)               Interrupt:36 Memory:f4800000-f4ffffff          lo        Link encap:Local Loopback               inet addr:127.0.0.1  Mask:255.0.0.0               UP LOOPBACK RUNNING  MTU:16436  Metric:1               RX packets:156 errors:0 dropped:0 overruns:0 frame:0               TX packets:156 errors:0 dropped:0 overruns:0 carrier:0               collisions:0 txqueuelen:0               RX bytes:14528 (14.1 KiB)  TX bytes:14528 (14.1 KiB)          # route     Kernel IP routing table     Destination     Gateway         Genmask         Flags Metric Ref    Use Iface     10.63.73.0      *               255.255.255.128 U     0      0        0 bond0.2     27.190.35.0     *               255.255.255.0   U     0      0        0 bond0.3     192.168.0.0     *               255.255.240.0   U     0      0        0 bond0     default         10.63.73.126    0.0.0.0         UG    0      0        0 bond0.2          traceroute result:     traceroute to 27.190.35.1 (27.190.35.1), 30 hops max, 60 byte packets      1  Cage-3-dsc-sb-phy-A (27.190.35.171)  3000.659 ms !H  3000.649 ms !H  3000.634 ms !H          arping result:      ARPING 27.190.35.1 from 27.190.35.171 bond0.3


KDE how to remove "Kickoff Application Launcher" popup

Every time I hover the cursor over K button, I get a popup: "Kickoff Application Launcher". It irritates me a lot. I managed to remove task manager popups in it's properties. But for Kickoff there is no property to remove it. KDE version: 4.8.5. How to remove this popup?


Can't remove same folder name twice

I have a folder called - `bin` , then I remove it by `rm bin` , re-create it and when I want to remove it again by `rm bin` the shell promts -               /bin/mv: cannot move `bin/' to `/u/y2010/zarnihu/../TrashCan/zarnihu/bin': File exists      seems it not let remove it cause it exist at `TrashCan` already ... I work with version - `2.6.18-92.1.18.el5xen` **edit -** `alias` :               >> alias     -       ls     =       (ls -a)     cp      (cp -i)     l.      ls -d .* --color=tty     ll      ls -l --color=tty     ls      ls --color=tty     mc      source /usr/share/mc/bin/mc-wrapper.csh     moonshine       rdesktop -g 1024x768 moonshine &     mv      (mv -i)     passwd  (links https://netsrv.cs.biu.ac.il/cgi-bin/change-pass-en.cgi)     pine    (pine -i)     pwd     echo $cwd     rm      (/bin/mv -f !* /u/y2010/zarnihu/../TrashCan/zarnihu)     unrm    cd $TRASH_CAN && /bin/mv -f !* $owd; cd -     unsetdisplay    echo remove $DISPLAY | xauth     vi      vim


Linux distro to run a MIDI-server on a PII 333 MHz

I am looking for a Linux distro that can be used to redirect MIDI message from the network to the soundboard a TurtleBeach Montego from 1997. Currently the computer is running Windows 98 se and I get a total latency of 10 ms when feeding audio back through an analog cable. Since the computer has no display, I cannot do any remote control (other than shutdown, which I have added as ad- hoc messages). Full hardware list:   * Sound: TurtleBeach Montego   * Graphics: NVIDIA GeForce 6200 AGP   * CPU: Pentium II Deschutes 333 MHz   * RAM: 256 MB   * IDE controller The following is a list of requirements for the setup   * A total latency shorter or equal to 10 ms   * SSH   * ALSA   * Utility programs (ls, cp, ... ) Also, it would be nice to achive digital audio return through "what you hear" port without increased latency (on Windows 98 I cannot come below 40 ms if I do so). All distros seems to be too demanding for that machine. Do I need to configure my own? I do not need any GUI since it is just a server.


How to create external, filesystem, read-only entrypoint for process internal memory?

Target platform is **GNU/Linux**. * * * Let's say I have:               void *p      I want to be create entrypoint for that internal memory in filesystem like:               /tmp/my_entry_point      And I'd like to be able to read that memory **from within another proccess**.               fd = open("/tmp/my_entry_point", ...)     read(fd, ...)      Is it possible to create and read such pseudo-device?


Can't login to Root User

I just installed Ubuntu 13.10 on VMware. I am trying to login to root from my user account using **su** command but unable to login as Terminal is saying the following :               su: Authentication Failed


How to set light colors instead of bold in PS (shell prompt)

I have an Archlinux installed on headless RaspberryPi. I'm using SSH to connect to it. I've added some colors to bash with editing               sudo nano /home/pi/.bashrc      and adding:               PS1='[\[\e[1;34m\]\u\[\e[m\]@\[\e[1;32m\]\h\[\e[m\] \[\e[1m\]\W\[\e[m\]]\$'      The only problem is, that the colors like **1;34** is not displayed as **Light Blue** , but as **Bold Blue** which is hard to read on the black terminal. Is there any way to set the colors to their "light variants"?


how to fix key lag on laptop on startup in battery mode?

I have an XPS 13 Developer Edition Dell Laptop running Debian GNU/Linux Jessie (testing). When the laptop starts up on battery power, the keyboard is so unresponsive that it is a real struggle to type in my password (key presses are delayed, ignored or stick and repeat many times). It's OK if it's running off the mains, even if I boot with the battery and then plug it in. I've not customised the default service configs (except trivial changes unrelated to this) and I keep my full list of `debfoster` keepers on github if you'd like to see the services I have running. **How can I set the default laptop battery mode to be something usable?** As requested, `systemd-analyze blame` shows                      1.084s kbd.service            394ms exim4.service            303ms NetworkManager.service            190ms ModemManager.service            179ms loadcpufreq.service            163ms laptop-mode.service            147ms accounts-daemon.service            129ms console-setup.service            117ms networking.service            100ms lightdm.service             98ms bluetooth.service             97ms systemd-logind.service             93ms keyboard-setup.service             89ms avahi-daemon.service             85ms systemd-fsck-root.service             73ms gpm.service      and `systemd-analyze critical-chain`               The time after the unit is active or started is printed after the "@" character.     The time the unit takes to start is printed after the "+" character.     graphical.target @2.434s     ??multi-user.target @2.434s       ??exim4.service @2.074s +358ms         ??basic.target @2.070s           ??timers.target @2.069s             ??systemd-tmpfiles-clean.timer @2.069s               ??sysinit.target @2.069s                 ??console-setup.service @1.936s +132ms                   ??kbd.service @531ms +1.403s                     ??remote-fs.target @531ms                       ??local-fs.target @530ms                         ??tmp.mount @524ms +5ms                           ??systemd-fsck@dev-disk-by\x2duuid-a2cf7f78\x2d691b\x2d4c01\x2da80c\x2d1bc6228230a5.service @466ms +57ms                             ??dev-disk-by\x2duuid-a2cf7f78\x2d691b\x2d4c01\x2da80c\x2d1bc6228230a5.device @465ms      but this seems consistent with and without the mains power supply. Some more info:   * I don't experience the keyboard lag if I drop to a TTY.   * I have performed a `cpufreg-aperf` both with and without mains and the results are similar when the machine is idle or I'm just typing in the terminal.   * some people have claimed that disabling USB autosuspend helps, but I have the same problem even after disabling it entirely and rebooting.   * once I plug in the mains and then unplug it, the problem goes away.   * forcing the `performance` cpu scaler (even on battery) doesn't help   * external USB keyboards are unaffected Some hardware info:               lsusb     Bus 001 Device 002: ID 8087:8000 Intel Corp.      Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub     Bus 003 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub     Bus 002 Device 004: ID 8087:07dc Intel Corp.      Bus 002 Device 003: ID 0bda:5604 Realtek Semiconductor Corp.      Bus 002 Device 002: ID 06cb:0af8 Synaptics, Inc.      Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub           xinput     ? Virtual core pointer                      id=2    [master pointer  (3)]     ?   ? Virtual core XTEST pointer                id=4    [slave  pointer  (2)]     ?   ? SYNAPTICS Synaptics Large Touch Screen    id=9    [slave  pointer  (2)]     ?   ? SynPS/2 Synaptics TouchPad                id=12   [slave  pointer  (2)]     ? Virtual core keyboard                     id=3    [master keyboard (2)]         ? Virtual core XTEST keyboard               id=5    [slave  keyboard (3)]         ? Power Button                              id=6    [slave  keyboard (3)]         ? Video Bus                                 id=7    [slave  keyboard (3)]         ? Power Button                              id=8    [slave  keyboard (3)]         ? Integrated Webcam                         id=10   [slave  keyboard (3)]         ? AT Translated Set 2 keyboard              id=11   [slave  keyboard (3)]         ? Dell WMI hotkeys                          id=13   [slave  keyboard (3)]


How to print all printable ASCII chars in CLI?

How can I list all the printable ASCII characters in the terminal?


How to force ssh client to use only password auth?

If I use pubkey auth from e.g.: an Ubuntu 11.04 how can I set the ssh client to use only password auth to a server? (just needed because of testing passwords on a server, where I default log in with key) I found a way:               mv ~/.ssh/id_rsa ~/.ssh/id_rsa.backup     mv ~/.ssh/id_rsa.pub ~/.ssh/id_rsa.pub.backup      and now I get prompted for password, but are there any offical ways?


getting error "Can't create transaction lock" with rpm

I am slowly making progress on installing Fedora into a Logical Volume for a DomU using Package Management. I have (with the help of the wonderful people at Unix & Linux) resolved a number of issues, mainly surrounding `rpm` (see links below):   * Unresolved Dependencies   * Fedora root install   * rpm issue I am using the `\--root` option with `rpm` to change my newly built version of rpm to `/mnt/fedRoot`. I have also directed `rpm` to look at the `rpmrc` file in the build folder, rather than on the actual `/var/lib/rpm`. Now Unfortunately, on any rpm file I run though I am getting: `error: can't create transaction lock on /mnt/fedRoot (Is a directory)`. Looking online, I found a few pages that indicated this was an issue with the `__db.*`. Though deleting them and rebuilding the db within my `rpm` folder fixed another issue, I am still getting the `transaction lock` error. Anyone have insight into this error?


Window Manager for TV

I have Ubuntu installed on my computer, which is hooked up to my TV. I have tweaked some of Gnome's settings to make it easier to use from my couch (display larger fonts, increase the size of the mouse, etc), and it kind of works ok. But there are a few problems:   1. A lot of windows that show up don't expect to have large font in them, so the contents get all garbled, and I have to resize the window (IF the window is resizable...)   2. There are still some UI items that are really small, such as scrollbars, and I don't see any settings to make them larger. This would be my biggest complaint. I already know about MythTV and Boxee, and that's not what I'm looking for. I am looking for a better way to use my PC from 10 feet away. I'm NOT looking for a way to turn my Linux box into a TV. Are there any window managers out there that work better with 10-foot user interfaces? If not, are there any different themes I can use? Any more settings I can tweak? EDIT: I am also trying to avoid reducing the resolution, because I still plan on watching hi-def videos on this thing.


What does deb-src mean in the sources.list?

I know I can download binary packages from repositories beginning with "`deb`", but what does `deb-src` do? E.g.:               deb-src http://archive.ubuntu.com/ubuntu natty universe      in /etc/apt/sources.list in Ubuntu 11.04


Files with no .sh extension not considered for autocompletion in zsh

I have noticed that unless I add an `.sh` extension to my shell scripts, Zsh does not suggest them for autocompletion **for execution** despite having them in my `PATH`. I have the same problem if I `cd` into the directory and start typing the filename. When I say for execution I mean typing the file directly on the prompt, i.e.:               $ my_shell_script      Are there any options in Zsh that control which file extensions are considered for this type of autocompletion?


How to list files that were changed in a certain range of time?

How can I list recursively all files that were changed between 22.12.2011 and 24.12.2011?


need to move files to different folder based on the creation date

I have set of files created from Monday to Friday..               a -- > 08/20     a1---> 08/21     a2---> 08/21     a3---> 08/21     a4---> 08/22     a5 --> 08/23      I need to move only 08/21 file to diffrenet folder. How is this possible ?


Extract files from FreeBSD ISOs - how to know locations?

How can I extract some of the folders of a stock FreeBSD install from the ISO without actually installing FreeBSD? I am trying to build a number of cross-compilers for various major versions of FreeBSD and need to get the `libc` and some includes and would like to be able to extract `/usr/include` and `/usr/lib` or rather parts of them ... **Edit:** given the first response I feel I have to elaborate a bit. It is trivial to mount an ISO file and I know how to do that on a number of platforms (e.g. on my Linux box: `mount -o loop FreeBSD-7.0-RELEASE- amd64-disc1.iso freebsd7/`). However, when you mount the installation ISOs for FreeBSD you will notice that they don't contain a folder `usr` as can be easily seen from the output of `find -type d -name usr` while inside the folder in which the ISO is mounted. Evidently the files are stored away in some format and I need to be able to parse whatever meta-information exists to find what file is the archive that contains the stuff I need to extract and then extract it.


How can the mac time code "b" be "n/a"?

There are 4 mac time codes for linux ext2:   * **M** -- modified   * **A** -- accessed   * **C** -- created   * **B** -- n/a How can one be "n/a"? What does it mean?


File extensions for unix shell scripts

On wikipedia, the article for .sh says: > For the .sh file extension type, see Bourne shell. How about other unix shells? I know that the shebang is used _inside the file_ to indicate an interpreter for execution, but I wonder:   * What are good practices for file extensions for unix shell scripts?    * Is it common for shell scripts to end with `.sh` **regardless** of which shell they run on?   * Are there any other commonly used file extensions for unix shell scripts?


Turning off swapping for only one process with cgroups?

I would like to turn off swapping for only one process. Swap should work as usual for the other processes. How I can implement this with cgroups?


Bring down and delete bridge interface that's up

How do I remove a bridge that has an IP address that was brought up manually and isn't in /etc/network/interfaces?               $ ifconfig br100                                                         br100     Link encap:Ethernet  HWaddr 00:00:00:00:00:00                                            inet addr:172.16.0.5  Bcast:172.16.0.255  Mask:255.255.255.0      Can't delete it:               # brctl delbr br100     bridge br100 is still up; can't delete it         Can't bring it down with ifdown:               # ifdown br100                                                       ifdown: interface br100 not configured


Linux Ubuntu / Mint Live CD user-home customization

I'm trying to customize Linux Mint Live CD with these instruction (uck doesn't work for me). What I want is to have more icons at its Live CD user (`/home/mint/Desktop`) but I can't find `/home/mint` on the squashfs filesystem nor at the initrd fs. The changes I make in `/etc/skel` do not apply either. What am I missing? (I'm using a lxdm wm.)


How do I handle switches in a shell script?

Are there some built-in tools that will recognize `-x` and `\--xxxx` as switches, and not arguments, or do you have to go through all the input variables, test for dashes, and then parse the arguments thereafter?


What is the canonical way to implement order independent options in bash scripts?

> **Possible Duplicate:**   >  How do I handle switches in a shell script? Most common shell commands allow the user to specify options in any random order. Positional Parameters like `$1` as commonly used in bash (I tend to write all my scripts in Bash but I don't think this question is actually Bash specific) scripts on the other hand, are order specific. Now I could come up with _some_ way to remove the need for the user of a bash script to observe any particular order in the supplying of optional arguments. (Using regular expressions or globs to test for the presence of some particular option in the `$@` expansion comes to mind.) However, I am really trying to find out whether there is a particularly canonical way to implement such options. Given the common syntax for options like `-r` for many shell commands I certainly feel there should be.


How to code shell script with command line arguments like -la

> **Possible Duplicate:**   >  How do I handle switches in a shell script? I know how to deal with simple arguments $1-$9 but I don't know how to code it with such as `-la`, for example `ls -la`. Could you show me example?


using devtmpfs for /dev

I have noticed the following option in the kernel: CONFIG_DEVTMPFS               Device Drivers -> Generic Driver Options -> Maintain devtmpfs to mount at /dev      And I see that it is enabled by default in the Debian distribution kernel `3.2.0-4-amd64` I am trying to understand what difference this option brings. Without this option, `/dev` is mounded as `tmpfs` , with this option, it is moundet as `devtmpfs`. Other than that, I don't see any difference. The `help` did not clarify it for me either: > This creates a tmpfs/ramfs filesystem instance early at bootup. In this > filesystem, the kernel driver core maintains device nodes with their default > names and permissions for all registered devices with an assigned > major/minor number. > > It provides a fully functional /dev directory, where usually udev runs on > top, managing permissions and adding meaningful symlinks. > > In very limited environments, it may provide a sufficient functional /dev > without any further help. It also allows simple rescue systems, and reliably > handles dynamic major/minor numbers. Could somebody please explain the difference between using `CONFIG_DEVTMPFS` vs the standard `/dev`?


How can the job of SDFlasher.exe given with FriendlyARM utility be accomplished on Linux?

I am playing with **FriendlyARM Tiny 6410**. The instructions on setting up an SD card for booting self compiled versions of linux kernel involve the use of **SDFlasher.exe**. People have tried to find an alternative for Linux here http://www.friendlyarm.net/forum/topic/3295 in vain. I am sure that whatever the utility does can be accomplished using some simple commands on the terminal, provided we know what exactly it does. Can somebody help? The getting started instructions are available here - http://www.minidevs.com/Tiny6410/Bootloader.html#2_1_Create_the_SD_boot_card_39_45863506360910833


How to make /dev/sdf?

On a server I have 5 disks (boot-disks + 4 disks in RAID, sda-sde). Now I need to connect a new disk using a PATA/USB-adapter. I do not have a /dev/sdf, so the USB-device is not found at all and cannot be seen in lsusb. The adapter works fine in a laptop with only one disk - there it's found under /dev/sdb. So; how do I create /dev/sdf so the adapter + disk can be found?


VIM(Mercurial) +python3.2 on debian wheezy: Could not load library function PySys_SetArgv

> ./configure --enable-python3interp=dynamic --enable-gui=gtk2     > --with-python3-config-dir=/usr/lib/python3.2/          make          vim --version|grep pyth              +cryptv          +linebreak       -python          +viminfo         -cscope          +lispindent      +python3/dyn     +vreplace      but if i do: :python3 print('hi') I get:               E448: Could not load library function PySys_SetArgv     E263: Sorry, this command is disabled, the Python library could not be loaded.


How to execute one command on all files within a folder

Saying, I have this tree and I want to execute `ruby` on all scripts within the folder. How could I archive through **one line of command**.               ./     ../     rb-script/         sample1.rb         sample2.rb


How to check for empty passwords?

Looking at all the ssh-login attempts by script-kiddies I assume that there are messed up systems connected to the internet that have password-less accounts set up. But how to check a Linux/Unix system for such accounts (perhaps created by a broken installer script, a confused admin or something like this)? As first approximation I can think of something like:               $ grep '^[^:]\+::' /etc/passwd /etc/shadow      Prints all accounts with an empty password - but perhaps on the concrete system such accounts are not even a problem because no program accepts empty entries - c.f. password(5): > However, some applications which read the /etc/passwd file may decide not to > permit any access at all if the password field is blank. But what about hashed **empty** strings as passwords (e.g. `crypt("")`)? How to check for them? And how to check accounts when more sophisticated account databases are in use (NIS, LDAP, ...)?


Python 2.7 and 2.6 coexist on the same machine

I want to follow a guide to install some software on a ReadyNas Duo (sparc). The guide indicates I need python 2.7, but I already have 2.6 installed.               ~# which python     /usr/bin/python          ~# ls -al /usr/bin/python     lrwx--x--x    1 root     root            9 Jan  5  2012 /usr/bin/python -> python2.6          ~# python     Python 2.6.6 (r266:84292, Mar 16 2011, 19:38:28)     [GCC 3.3.5 (Debian 1:3.3.5-13)] on linux2      Other applications I have installed depend on python 2.6, but I'm not sure if they are going to break if I move to 2.7 Is it possible to install 2.7 alongside 2.6 so they coexist? I assume that applications depend on the default python using `/usr/bin/python` symlink, so ideally 2.7 could sit in `/usr/bin/python2.7` and the new application could just reference that directly?


Mounting a drive and accessing it

I have created a partition on `/dev/sdb` I want to be able to go to this drive when I type:               cd /name      What I did, which did not work.   * `mkdir name` in `/mnt`   * mounted the `/dev/sdb` on `/mnt/name`   * updated the `fstab`: `/dev/sdb /name ext3 defaults 0 1`   * `mount -a` (when i do this i get this message: 'the /name is not found') What am I doing wrong here. Running latest Debian distro


Difference between .changes and .dsc files? [manually updating package]

What is the difference between .changes and .dsc file? Debian Policy says about required field set, but misses the essence and the meaning on the whole. Why have two (actually there are three) when you can have the only one? Can this .changes file be derived from .dsc (or vice versa)?   What is the transformation process? **Why?** I am trying to create Python script that automates updating of pure Python packages for Debian or Ubuntu systems. It needs to be cross-platform, because it is quite common to develop Python stuff on systems without classic Debian toolchain.


How do I dual boot backtrack 5 r3 and Windows 8?

I have already successfully completed the Ubuntu and windows 8 dual boot but now I am trying to add backtrack and my computer (Hp 2000 Notebook pc) will not even see my backtrack files. I am trying to install backtrack from a usb and I have already "Extracted"(yes I know) the iso file.


How to change the forgotten root password?

I am very new to Debian linux, I forgot my root password...actually I think I know what it is because it is the same password I have for pretty much everything but in the Terminal in tell me "Sorry, try again." Is there a way to reset the password? If so how? I am very new and I am not familiar with any type of command proms in the Terminal.


new user can't login in Mint

I have created a new user in Mint 12, with this commands:               sudo useradd irene     sudo passwd irene     //here I entered the password      But if I try to login with this user the screen goes black for a couple of seconds and then I'm back at the login screen (no error appears).   I know the password I enter is correct, because if I enter something else the "wrong password" shows up. If you need more info or tell me what log files I should check, please tell me.   Thank you for reading. **edit: adding info**   here are the results for groups for the 2 existing users (mine, which is administrator, and the one for my gf):               $ groups osdave     osdave : osdave adm dialout cdrom plugdev lpadmin admin sambashare     $ groups irene     irene : irene      I'd say I have to add irene to a group, but which one?   Also, login as irene (in console):               su irene      and moving to home, there is only 1 `osdave` directory: shall I create it myself?               mkdir irene


Rsync seems to back up files that haven't been opened or changed

I have started using `rsync` to back some data on my mac to an external HD. It works really well, but I have noticed something odd. Every time I run the command, I get a list of files that haven't been modified or even opened since the the last backup. Why might this be?


How to clear the last -10 info?

How to clear the last -10 information only for a Linux system? I tried to execute the command `> /var/log/wtmp` to clear the last info, but it clears the whole login info , but I need to clear only last -10 login info.


RHEL - permanently unmask all sub-folders and files

I'm new to RHEL, and I'm having issues unmasking a collections of directories. I have a folder where content will be generated content from a python script. The subfolders will exists for a period of time, then get deleted. The folders were originally masked with one user being able to read/write to them, but recently we needed to allow anyone to access these folders. I ran the unmask command on the folder with the -R (recursive option) to unmask all subfolders and files. It appeared to work until new content was generated and BAM same problem, the folders and files were masked. How do I permanently unmask all sub-folders and files for a folder? I need these files to be accessible to everyone with create/read/write access.


How can I change which file manager dropbox opens with by default?

I installed Xubuntu on a new laptop I got, and this being my first time using xfce, I accidentally told my dropbox folder to open with nautilus (coming from ubuntu) and not thunar. Now it will not allow me to open the folder via the task bar. Is there any way to tell it to use thunar instead?


How to get a history entry to properly display on multiple lines

Suppose I have entered a function at the bash prompt, on multiple lines rather than squeezing it onto one with semicolons:               $ function blah {       echo blah     }     $ history -1     12690  function blah {\necho blah\n}      How do get this to display with real newline characters instead of '\n'?


NVidia driver for the 3.2.9 kernel

I upgraded the kernel on my OpenSUSE 12.1 64bit from 3.1.9 to 3.2.9, and when I rebooted, X-windows refused to start, and I got into shell. I tried to run it manually with `startx`, but still no good. I managed to make X-windows work by removing the NVidia driver(I had the latest version). When I tried to reinstall it, the installer complained that the drivers are compiled with GCC 4.5 and therefore are not compatible with the kernel, which is compiled with GCC 4.6. I think it's safe to assume that's the reason it didn't work in the first place... Installing the NVidia driver from the bumblebee repository(originally I installed it from the `NVIDIA-Linux-x86_64-295.20.run` installer from NVidia's site) didn't work either(this time I just got a black screen, and had to use failsafe mode to remove that driver). Now, I know the NVidia driver for Linux is not open source, so I'm not going to be able to compile it myself, but is there another way to make it work with the latest kernel, or do I have to wait for NVidia to release a new version for GCC 4.6 compiled kernels? **UPDATE** I've mailed to NVidia, and their tech support noticed that I understood the error message wrong. The NVidia driver was compiled with GCC 4.6 - it was the Linux kernel that was compiled with GCC 4.5. So, the solution is clear - I need to compile my own kernel...


Why does the /boot partition get updated when I install software

Based on some recommendations I read online, on install of a new (Ubuntu) system, I made my `/boot` partition separate from `/` and small in size (only around 50 MB). It makes sense to me that you would only need limited files in that partition, and the boot sequence only needs so much data initial data on boot so no need (or so goes my thinking) to make it much larger. I was surprised as I started using my system and installing software was failing due to the following (or similar) issue:               gzip: stdout: No space left on device     cpio: write error: Broken pipe     E: mkinitramfs failure cpio 1 gzip 1     update-initramfs: failed for /boot/initrd.img-3.2.0-18-generic with 1.      I have already seen this question and am planning on doing a reinstall with a larger `/boot` partition. My questions are: **Why does the`/boot` partition data get updated when I am only installing software?** obviously 50 MB is too small for my needs, so **what would be a reasonable`/boot` partition size?** **Does it even make sense to have separate boot partition?** after all it could simply use all the disk space it wants in the `/` partition.


RHEL6: system default font

When I fire up urxvt or xterm, by default the font is a sans-serif monospace unaliased font. I would like to make this my font in other applications, but I can't find it in my system font list (i.e. I can't find it in the font list in gnome-control-center). I tried looking in `/etc/X11/Xresources` and `~/.Xresources`, but there are no fonts mentioned in either. Does anybody know how to determine what font this is?


how to use syslog to avoid log file being garbled when multiple proceses are trying to write to the same log fille?

I wanted to know usage of syslog when multple processes are trying to write to the same log file like               for i in $var     do     some process >> logfile &     done     wait


What's the easiest way to find out relevant video card/driver information

I need to know my video card/chipset, X11 Driver, driver version, and Xorg version. It seems to me that finding this information is always scattered throughout various utilities. Is there an easy way to get it all at once?


Wildcard automounts with systemd

I’m running jessie/sid with systemd 208 and try to convert the following wildcard autofs configuration to either an `/etc/fstab` or `.mount`/`.automount` definition.               $ cat /etc/auto.master     /home/* -fstype=nfs homeserver:/exp/home/&      (homeserver runs a Solaris with each subdirectory in `/exp/home/` being a separate share.) Is there a way to emulate wildcard maps with systemd?


Using files that have spaces in their name in pipes

I have folder named `play` which contains a file `damn file` (with space). When I use `find` and pipe the output to `tar`:               find play/ -name 'damn*' | tar cf archive.tar -T -      It works perfectly. Why does this works The output of `find` contains space that should cause problem for `tar`. When I use this command:               tar cf archive.tar $(find play/ -name 'damn*')      bash shows these errors:               tar: play/damn: Cannot stat: No such file or directory     tar: file: Cannot stat: No such file or directory     tar: Exiting with failure status due to previous errors      I'm confused. Why does the first example work?


How to do array addition multiplication program in a shell script?

Write a program arr_calc to perform array addition and array multiplication, The program takes 4 arguments: Argument 1: The file name of the input array A   Argument 2: The file name of the input array B   Argument 3: The file name of the output array C   Argument 4: The calculation (a for addition, m for multiplication) e.g., arr_calc file1 file2 file3 a


routing between two private networks (NICs)

I have two private networks say: `10.0.1.0/8` and `192.168.0.0/24` I have two machines with two NICs per each machine.               machine1 NIC1: 192.168.0.10     machine1 NIC2: 10.0.1.10          machine2 NIC1: 192.168.0.11     machine2 NIC2: 10.0.1.11      How to configure the routing so that from machine1 to machine2, it would use actually machine1 NIC2? The thing is that 10.0.1.0 network is Gigabit and 192 one is Fast Ethernet (100Mbit). My goal is to communicate between those two through the fastest connection (i.e: NIC2) even if they are trying to access by NIC1's IP.


Can Bumblee really help with Optimus Laptops?

I bought Lenovo Z570 which comes with nVidia GEForce GT520M (Optimus technology) and recently I installed Ubuntu 11.10. Surprisingly, whenever I boot my system CPU fan rotates at very high speed and so my battery backup is screwed up.I googled about this problem but I am not able to come to some conclusion. According to some vague sources, because of some bug, the Linux kernel is not able to support Optimus technology as of now. Does anyone have any solution for this problem?


Unix script to extract the pattern match

Input File:                                                                Product                                    Releases                  ic                                      06.16.060                  Kit                                  2.8@20140409.0      I want to extract the information from the above input text file using unix shell and save it in a file as follows:               ic    06.16.060                                    kit   2.8@20140409.0


is it possible to send a control sequence to a terminal emulator using the keyboard

If you type `echo -e '\eZ'` and hit return in a shell running in an xterm, you'll see that the terminal emulator prints an obscure code `1;2c`. This seems to indicate that xterm interprets the VT100 control sequence `\eZ` (`ESC Z`, return terminal ID) and acts accordingly. Now, if you press `ESC Z` in the same console, nothing happens. Does this mean that it is not possible to send control characters directly using the keyboard? I'm not sure what is happening here, because pressing `CTRL s` (control flow) does stop the console output until you press `CTRL q`. So why does `CTRL s/q` work and not `ESC Z`?


Is there a software like Nokia Ovi Suite for syncing Nokia symbian phones with GNU/Linux?

I have been looking unsuccessfully for many days for a nice linux software similar to the Nokia Ovi Suite or Nokia PC Suite for syncing Messages, Contacts etc in Ubuntu/Fedora. There were rumors about a 'Nokia Ovi Suite for linux' in Nokia Beta Labs. But it didn't exist last time I checked. It is really inefficient to switch to windows time and again just to sync my phone. Any suggestions?


Read all files in folder and subfolders - progress and size

Command I have is:               time find . -type f -print -exec cp {} /dev/null \;      This command finds all files in current folder and subfolders, print the name of each file and copy each of them to /dev/null. At the end it shows how much time it took to copy all the files. What I need is to count (show) all copied bytes at the end (so I would be able to compute the read speed //cache doesn't matter//) and/or show each file's size beside it's name. If there would be possibility to show progress for each file (pv) - that would be great! For this purpose I'm using Cygwin and it's bash shell, but script should also work on real Linux systems. **EDIT:** The idea is to read the files, not to copy them (rsync).


Use a variable reference "inside" another variable

I'm sure it is relatively simple, I just don't know how to do it.               #!/usr/bin/ksh     set `iostat`     myvar=6      I want to something like `echo ${$myvar}` which i want interpreted as `${$myvar}` -> `${6}` -> `value`


Plotting the sleep/wait chain of a process

I often want to know why a process in the middle of a pipeline is sleeping and not busy processing data. My current method is:   1. find the `pid` of interest   2. `sudo strace -pt pid` to get the blocking syscall and object (fd, child, futex, etc.)   3. hit `Ctrl``c` to detach strace   4. look up the appropriate object in `/proc/pid`   5. `grep /proc/` or use `lsof` to find the other end of the pipe or process being waited on   6. repeat from #1 with the new `pid` This is a pretty slow process that combines a lot of tools that don't play well together (`strace` in particular is hard to automate). Is there a tool that will do this loop for me and plot out the wait chain of a process, or at least make one iteration less awkward? Linux 3.2, Ubuntu LTS 12, x64, under VirtualBox, if it matters.


How to detect a desktop application hanging

I want to write a script that will detect whether a particular desktop application is responding and kill it. Is this possible? I know I've seen the GNOME desktop put up a "Application is not responding" dialog, and I figure it sends some sort of signal to the window and waits a certain amount of time for a response. If there's a way to do something like that, I'd appreciate some details. Thank you! (This is on xfce, if it matters)


How to list killable tasks?

As manpage of ps states A process with STATUS with the value "D" means "uninterruptible sleep (usually IO)" Also, I've read: You should use TASK_INTERRUPTIBLE here, otherwise your kernel thread cannot receive signals and you are not able to kill(1) your thread from userspace or use kthread_stop() in the kernel. If the above is not enough you can read:  process status (STAT) of D indicates that the process is in an "uninterruptible sleep" state. In real-world terms, this generally means that it's waiting on I/O and can't/won't do anything - including dying - until that I/O operation completes. Let's say I run a process that waits IO:               [root@mpinode02 Distros]#  find / -mmin +10 > /dev/null &     [1] 15592      Then I take a look to the status and wchan process               [root@mpinode02 Distros]# ps -C find -ostat,comm,wchan     STAT COMMAND         WCHAN     D    find            sleep_on_buffer      OK, let's see if the process is really uninterrumpible:               [root@mpinode02 Distros]# kill 15592          [1]+  Terminated               time find / -mmin +10 > /dev/null      So, as you can see process with D in the real world was killed, is the man page of ps outdated? Indeed I see that there is a new kind of state: TASK KILLABLE but I want to know hot to list them. Do you know how to list killable tasks or identify them?


Permission denied (13)

I am using Clonezilla 2.2.3-10. When trying to mount via `samba`, I get permission denied (13). I am able to connect via Windows XP, by simply entering the ip + share name               \\192.168.1.240\MyShareName      I am asked by credentials and I am able to access the share. Going through Clonezilla, it tries to mount with the following:               mount -t cifs //192.168.0.240/MyShareName /home/partimag -o username=myusername      and I receive the permission denied error.   Any help would be appropriated.


Wrap sentences into columns

I'm looking for a way to take sentences and wrap them. Using something like `column` is not what I want as in my scenario there will be multiple sentence columns in the 80 characters. Is there any way to do this? I should note that doing once sentence is not an issue. It's doing multiple ones at the same time. 5/15/2014 | Friday | Server went down and cause outage | Rick accidentally shut it off. I added the | to delimit. But each of these would be wrapped to a certain length. All at the same time with respect to each other.


Which driver is handling my touchpad?

I would like to know how to determine which driver (out of those below) is handling my touchpad: appletouch.ko.gz, cyapa.ko.gz, sermouse.ko.gz, synaptics_usb.ko.gz, bcm5974.ko.gz, psmouse.ko.gz, synaptics_i2c.ko.gz, vsxxxaa.ko.gz


Getting my Smart Card reader to work on Linux

I got a Smart Card reader, that I ripped from a Laptop the other day. It is an internal Smart Card reader, though it uses USB, so making a cable for it, was no problem. It seems it's recognized by the USB driver correctly:               [1370965.148035] usb 1-3.2: new low-speed USB device number 25 using ehci-pci     [1370965.229948] usb 1-3.2: New USB device found, idVendor=08d4, idProduct=0009     [1370965.229962] usb 1-3.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0     [1370965.229969] usb 1-3.2: Product: Fujitsu Siemens USB Smartcard Reader     [1370965.229976] usb 1-3.2: Manufacturer: OMNIKEY AG      As it is a pretty much bog standard Fujitsu Siemens USB Smartcard Reader, it should be work with the drivers for the "Fujitsu Siemens SmartCard USB 2A" and "Fujitsu Siemens SmartCard Keyboard USB 2A". Both of which are the exact same thing, except the "Keyboard" variant is in permanently attached to a USB keyboard (as in, in the same case). The PC/SC drivers don't recognize the reader. The readers I mentioned above are supported by libccid, but `pcscd` can't recognize the reader by it's vendor and product IDs:               00000286 hotplug_libudev.c:260:get_driver() Looking for a driver for VID: 0x08D4, PID: 0x0009, path: /dev/bus/usb/001/026      (It just steps over to the next USB device. Eventually, it tries all USB devices and does nothing after that.) I'd like some advice what I should do now? The only thing I can do, is download the CCID driver source and try to hack it in there, or at least that's the only thing I can come up with right now. Is there anything else I can try? * * * I got a little bit further with OpenCT: I had to uncomment a line in `/etc/openct.conf`:               driver  cardman {         ids = {     #       usb:076b/0596, # OMNIKEY CardMan 2020     #       usb:076b/1784, # OMNIKEY CardMan 6020             usb:08d4/0009, # Fujitsu Siemens SCR USB Reader         };     };      I don't know why the IDs of those `cardman` drivers are commented-out, maybe the driver isn't really working yet? Anyway, with this, I can get something with `openct-tool`:               $ openct-tool list       0 OMNIKEY CardMan 2020/6020/6120      I've put in a simple EEPROM card and it senses this card, but I can't read from it:               $ openct-tool read     Detected OMNIKEY CardMan 2020/6020/6120     Card present, status changed     failed to reset card      So, it's still not working, really... * * * There used to be a driver for PC/SC that supported this card reader: pcsc- lite-cm2020, however, it seems to be gone now. I've downloaded the source package from the manufacturer. It is very old. I've copied the contents to `/usr/lib64/pcsc/drivers`, but it doesn't work obviously, since it's compiled for the wrong architecture. The only sources in there, compile the kernel module, but not the `libcm2020.so` that I need for `pcscd`. I couldn't find the sources for `libcm2020.so`, if I'm missing something, and indeed it is possible to compile the library, a hint where to find the sources would be awesome.


Backtrack 5 R3 - Refuses to connect to VPN

I wanted to ask this on the Backtrack Linux forums but for some reason I couldn't register, reading it was disabled by the administrator. So I apologize if I'm in the wrong place (which I feel like I am, even though BT is based on Ubuntu). A week ago my VPN connections were fine. I'm using network-manager on GNOME. My OpenVPN connections (done via terminal) also connected fine. Now, out of nowhere, the PPTP VPN setup in my network-manager keep reporting a failed connection, and when I try OpenVPN it reports a success, but I can't access the internet. If I enter in a site it just hangs forever :( The same VPN with same config, same credentials, same everything works perfectly on Ubuntu 12.04 LTS and Windows 7 (I have a triple boot). I did not run any updates or upgrades since then. What can I do?


Get vertical cursor position

This might sound pretty weird, but I know how to set the vertical cursor position in Bash like this:               echo -e "\e[12H"      This moves the cursor to the 12th line (starting with 1). So how do I get the cursor position (line number) using linux bash? It would be helpful if I could simply store this value in a variable so I can calculate with it. **EDIT:** This is the error I get:               $ sh rowcol.sh     -en         read: 9: Illegal option -d                                   test.sh: 12: Bad substitution


Help with directory ownership/permissions for apache

I've been using Ubuntu Linux for a couple years now but I still have trouble with permissions. I need to setup my web server for production. The root web directory should always be accessible by Apache and me (I login to ftp with my account) as well (if possible) by my CGI applications. I would like to hear your ideas of the best way to set something up like this in production. Maybe what I've suggested isn't the best way to set this up even. If there's a better way to set things up for production (I plan to be using CGI scripts and compiled CGI binaries)


host only ip address: can it be 10.*.*.*?

My router is set to have computers IP range from 10.1.1.1 to 10.1.1.60 I'm trying to run Linux in virtual box in a host computer with windows 7. The host computer has 10.1.1.5 currently, which is dynamic, set by DHCP on the router. The command, `ipconfig`, on the host computer shows the VirtualBox host only IP address 192.168.56.2 and Linux in it was well connected to the network. But later I changed the IP address of Linux as static 10.1.1.16 using `vim /etc/network/interfaces`. Then in the host computer's network configuration settings, I changed the IP address of VirtualBox as 10.1.1.16. Now my Linux is no longer connecting to the network. I'm new to this and am attempting to learn how these things work. Please help in showing me, what did I do wrong?


Why is vim not being opened in its own screen?

When I type `vim` in `xterm` the program is not opened in its own screen, but in the very same I am writing commands in. Let me explain: for example, lets say I type in the terminal `ls -l /usr/bin` and get a big list of programs. After that I type `vim` and the program is opened, but if I scroll up I can still see the list of programs in `/usr/bin`. As far as I remember, when I opened `vim` it would start in a clean screen with nothing behind it, so if I wanted to go back to the terminal I had to quit. ![Here is a screenshot of what is happening](http://i.stack.imgur.com/HG5b5.png) Why is `vim` behaving like this and how can I change it?


Mail Server on CentOS - Relay access denied

I have setup Postfix and Dovecot on my CentOS Server. Now I am using unsecure SMTP and POP/IMAP (ports 25 and 110/143). I can send mail locally to and from myself, but when I want to send email TO my gmail account, eg. david@gmail.com, it responds:               Relay access denied      I tried the following, but it still gives me an access deny issue. Made the following changes to `/etc/postfix/main.cf`:               smtpd_sasl_local_domain =     smtpd_sasl_auth_enable = yes     smtpd_sasl_type = cyrus     smtpd_sasl_security_options = noanonymous     broken_sasl_auth_clients = yes     smtpd_sasl_authenticated_header = yes     smtpd_recipient_restrictions =         permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination


SMTP/POP server only for internal e-mails on hosted domain

We have a domain for a web site and e-mail that's hosted off-site. (We don't have a reliable enough connection to host it ourselves.) Our shared host sometimes has SMTP problems, but never POP problems. Is it possible to set up an e-mail server on CentOS 6.4 that will work internally (i.e. sending between e-mail addresses on our domain, even though our network domains are named differently than our web site) even if our Internet is down or our shared host's SMTP server is down, but will use our shared host's SMTP for outside addresses, and will still allow POP mail to be retrieved from the shared host, e.g. when we're at home or on the road?


how does ssh discover hostnames on the network?

We have a server on the company network named serverA, and if I type `ssh serverA`, it will connect my PC to this server, even though there is no entry for this server in my `/etc/hosts`, but I used to have another PC where I do have to set this up manually in `/etc/hosts`. So, how does ssh discover hostnames on the network, and how can I make sure it works? (Both these machines I mentioned are running Kubuntu Linux, the older one runs 12.10, the newer one runs 13.04.) I have the following content in `/etc/resolv.conf`:               # Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)     #     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN     nameserver 127.0.1.1     search mycompany.com      Processes listening on port 53:               sudo ss -ulnp | grep 53     #UNCONN     0      0                         *:5353                     *:*      users:(("avahi-daemon",937,12))     #UNCONN     0      0                 127.0.1.1:53                       *:*      users:(("dnsmasq",1781,4))     #UNCONN     0      0                        :::5353                    :::*      users:(("avahi-daemon",937,13))


How to ensure the bluetooth is switched off after boot up?

Please show me which magic button to press for the case where I'm tired of manually switching off the distracting bluetooth light on my laptop after every boot-up.


`p` key doesn't work in X

Today I had to force-shutdown my machine after it froze during resume from suspend. Since the reboot, I've found that the `p` key doesn't work normally in X. It does work normally in the console. Modified keypresses, e.g. `shift`-`p`, `ctrl`-`p`, do work normally. Pressing `p` with `xev` running gives               FocusOut event, serial 34, synthetic NO, window 0x5000001,         mode NotifyGrab, detail NotifyAncestor          FocusIn event, serial 34, synthetic NO, window 0x5000001,         mode NotifyUngrab, detail NotifyAncestor          KeymapNotify event, serial 34, synthetic NO, window 0x0,         keys:  2   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0                   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0         Could this problem be happening because of file corruption? What file would I check for corruption? I've done an fsck on the system drive —by running `tune2fs -C 200 /dev/sda3` before rebooting— which seems to have come up clean. I.E.               $ sudo tune2fs -l /dev/sda3 | grep 'state\|check'     Filesystem state:         clean     Last checked:             Sat Dec 11 12:27:16 2010     Next check after:         Thu Jun  9 13:27:16 2011      I'm running an updated (last dist-upgrade done yesterday) ubuntu 10.10.


Comment all lines from last commented line to line with 'foo'

Consider a text file `users.txt`:               #alice     #bob     charlie     dotan     eric      I need to comment everything from (exclusive) the last commented line until (inclusive) `dotan`. This is the result:               #alice     #bob     #charlie     #dotan     eric      **Is there a nice`sed` oneliner to do this?** I'll be happy with any tool, not just `sed`, really. Currently I am getting the line number of the last commented line as so:               $ cat -n users.txt | grep '#' | tail -n1       2 #bob      I then add one and comment with `sed`:               $ sed -i'' '3,/dotan/ s/^/#/' users.txt      I know that I could be clever and put this all together with some `bc` into an ugly one-liner. **Surely there must be a cleaner way?**


Problem with former RAID hard drive settings in Linux Mint 17

I'm new to Linux, just installed Linux Mint for the first time. I have two hard drives which were previously in a RAID configuration. Now before I have installed Linux I've changed them to individual drives.   * I've changed BIOS setting to AHCI   * I've switched off the J Micron RAID controller   * I've changed drive signatures under Windows 7 They are properly detected and working in Windows 7, but in Linux even though they're visible in “Devices” as two individual drives the system is unable to mount them. GParted still displays:               /dev/mapper/isw_ccjafbfdhc_RAID_Volume0 with all space unallocated.      When I display information for an individual disk it says:               The device /dev/sdc1 doesn't exist     Unable to read the contents of this file system!     Because of this some operations may be unavailable.     The cause might be a missing software package.     The following list of software packages is required for ntfs file system          support:  ntfsprogs / ntfs-3g.      What should I do in order to access these drives in Linux? Please point me in the right direction. ### UPDATE After booting to Windows again, the two HDDs had again the same signature, and unfortunately the same file structure i.e. files were overwritten with files from the second hard drive. Fortunately I had them backed up.


YUM UPDATE stuck forever

I created repository for RHEL 5.6 . There was already an exiting repository for RHEL5.2 which I deleted. And i run following commands yum clean all yum clean metadata then, Yum list all It list all the packages. But when I type YUM UPDATE. It shows               Setting up Update Process     Setting up repositories     rhel-local                100% |=========================|  951 B    00:0     Reading repository metadata in from local files     primary.xml.gz            100% |=========================| 1.1 MB    00:0     ################################################## 3229/3229     Setting up Update Process     Setting up repositories     Reading repository metadata in from local files      And thats all folks. Further there is no response from YUM UPDATE. Any idea


Prevent mplayer from changing system volume

When I change the volume in mplayer it also changes for other applications. How can I configure mplayer to only change its own volume? Or is this a problem with the rest of the audio stack? I am using alsa with esd.


Running K3b from the command line

I wish to run K3b from the command line. I do not mind if it opens windows, as long as I do not have to click in them and they ultimately close. Specifically, I wish to run `k3b --copy /dev/cdrom`. This works, of course, but I have to click a window to actually start the processing, which is annoying in my context. The reason I want to do everything from the command line is to embed it all in a simple script, and forget it as soon as it is started (Yes, I know I cannot fill the drive from the command line ... not yet :-) ) I know that many of the K3b processing features are just MMI embedding of independent applications, which could be called independently of K3b (K3b explicitely lists them). But this apparently not the case for `k3b --copy`. I am running Mageia Linux with Kde. **Added after first answers** I do not want to burn new copies. This is exclusively to have ISO images of the CDs/DVDs, for processing on hard disk. My archive is fairly large and unwieldy on optical media. I realize K3b is bloated. But it has been doing a good job for me so far, and I tend to trust it. Suggestions of other applications are certainly useful, still. This said, I like command line, and I am interested in an answer to my original question if there is one.


Getting error opening Windows. Error 1: Filename must be either an absolute pathname or blocklist

I've installed CentOS 6.4 on UEFI machine. Created `/boot/efi` partition and installed grub in it. But when I open `Other` in the grub menu I get this error: > Error 1: Filename must be either an absolute pathname or blocklist I've Windows 8 installed in `/dev/sda2` and here's my `grub.conf` :               device (hd0) HD(4,a126000,32000,8531805b-e9fb-4220-bdcd-7eec68f1e1c7)     default=0     timeout=5     splashimage=(hd0,8)/boot/grub/splash.xpm.gz     hiddenmenu     title CentOS (2.6.32-358.el6.x86_64)             root (hd0,8)             kernel /boot/vmlinuz-2.6.32-358.el6.x86_64 ro root=UUID=9f88ba7d-4787-4ecb-8294-436170ecd53e rd_NO_LUKS rd_NO_LVM LANG=en_US.UTF-8 rd_NO_MD SYSFONT=latarcyrheb$             initrd /boot/initramfs-2.6.32-358.el6.x86_64.img     title Other         rootnoverify (hd0,1)             chainloader +1      Any help would be appreciated.


What are the difference between those four commands (fifo, process substitution, redirection...)

My goal is to create a simple echo server using `nc` and a single `fifo`. I'm not looking for the best way to do it, I'm merely trying to understand the semantics of the following commands (when does fork happen, why, what does it change, why the commands behave differently...). I'm using Bash, so I'm not sure if all of the commands will work with a POSIX `sh` or `zsh`, `ksh`, ... Here are the four commands I'm mentioning in the title (assuming that I already did `mkfifo fifo`):               cat fifo | nc -l localhost 8888 > fifo     exec 3<> fifo && nc -l localhost 8888 <&3 >&3 && exec 3>&-     nc -l localhost 8888 <(cat fifo) > fifo     nc -l localhost 8888 < fifo > fifo      Now I would expect the 4 commands to do the same thing, at the very least the two last ones to do the same thing.   1. The first command behaves as expected, a simple echo server that shuts down when the client closes the connection.   2. Behaves like 1.   3. I can connect to the server, send data, but I never receive anything back. When I close the client connection, the server shuts down.   4. Can't connect to the server, the server listens forever.


Routing a LAN through OpenVPN on OpenBSD 5.5

I'm configuring an OpenVPN gateway to allow a LAN access to the internet through the tunnel. The gateway is running OpenBSD 5.5-stable amd64 on the PC Engines APU platform. The LAN contains `re1`, `re2`, and `ral0` interfaces. It also contains `vether0` which hosts the local `192.168.2.0/24` network. These interfaces are linked under `bridge0` to provide a common gateway, subnet, and DHCP via `dhcpd`. The VPN is established and `tun0` is opened. The gateway itself can access the VPN just fine. The problem is that, by default, the hosts access the VPN with their native `192.168.2.0/24` addresses. NAT is needed to translate the local network to the VPN network at `10.0.1.0/24`. I have tried the following `pf.conf` configurations:               # pf.conf -- 10.0.1.10 is my tun0 gateway     set skip on lo     block return     pass in quick on { vether0 re1 re2 ral0 } from 192.168.2.0/24 to !10.0.0.0/8 nat-to 10.0.1.10     pass      I had similar results with these rules:               # pf.conf     ...     pass in from any nat-to 10.0.1.10     pass out from tun0 to any      This allows LAN traffic to pass through `tun0` with a source address of `10.0.1.10`, and return traffic is passed back to the respective host. The new problem is that return traffic still does not appear to be routing correctly. For example, I can ping `8.8.8.8` and `google.com` from any LAN host, however the first reply is ALWAYS dropped between `tun0` and the return interface. Tools like `dig`, `nslookup`, `traceroute`, and `ping` are generally sluggish and take far longer than they should. Despite some traffic still passing, browsers and other applications are unusable. `tcpdump` demonstrating the loss:               # 192.168.2.103 is a LAN host     # 74.125.131.139 is google.com          # on ral0     20:59:35.668251 192.168.2.103 > 74.125.131.139: icmp: echo request <-- no reply     20:59:40.651184 192.168.2.103 > 74.125.131.139: icmp: echo request     20:59:40.736748 74.125.131.139 > 192.168.2.103: icmp: echo reply     20:59:41.656101 192.168.2.103 > 74.125.131.139: icmp: echo request     20:59:41.741251 74.125.131.139 > 192.168.2.103: icmp: echo reply     20:59:42.661071 192.168.2.103 > 74.125.131.139: icmp: echo request     20:59:42.802410 74.125.131.139 > 192.168.2.103: icmp: echo reply          # on tun0     20:59:35.668359 10.0.1.10 > 74.125.131.139: icmp: echo request     20:59:35.764052 74.125.131.139 > 10.0.1.10: icmp: echo reply <-- here's the missing reply, it didn't get to ral0     20:59:40.651221 10.0.1.10 > 74.125.131.139: icmp: echo request     20:59:40.736721 74.125.131.139 > 10.0.1.10: icmp: echo reply <-- but the of the replies rest did     20:59:41.656138 10.0.1.10 > 74.125.131.139: icmp: echo request     20:59:41.741226 74.125.131.139 > 10.0.1.10: icmp: echo reply     20:59:42.661107 10.0.1.10 > 74.125.131.139: icmp: echo request     20:59:42.802372 74.125.131.139 > 10.0.1.10: icmp: echo reply      I know that this is almost certainly a NAT issue in `pf.conf` but after so many configuration attempts I'm having trouble finding the correct way to go about passing traffic. When I was using DD-WRT and `iptables`, this was my configuration:               iptables -D FORWARD -i tun1 -j logaccept     iptables -D FORWARD -o tun1 -j logaccept      I'm not sure how to "port" this to `pf`, though. Any suggestions would be greatly appreciated!


How to awk the "df -Pm" command to get FS names that have more then 90% the FS usage?

I'm trying to get the names of all disks with at least 90% usage, using this oneliner:               df -Pm | awk '+$5 >= 90 {print}'      But it doesn't show the "100% usage" case, I need to grep for "100%". Why doesn't it work correctly?


Installing sublime-text 2 with pacman

I want to install sublime-text 2 in Arch Linux with `pacman` package manager; how i can do this work?


mutt: conditional date format in "index_format"

I have following value set for `index_format` in mutt:               "%Z %{%Y %b %e  %H:%M} %?X?(%X)&   ? %-22.22F  %.100s %> %5c "      which displays date in the format as               2013 Dec 5      I was wondering whether it is possible to have different date formats depending on how old the email is. By that I mean:               for less than 7 days:  today, yesterday, tuesday, monday     this year:             Dec 5     older than this year:  2013 Dec 5      I think I have seen this functionality in Thunderbird. Would be nice to have it in mutt


Parsing a delimited text file in bash as command arguments

I have a text file split up like so:               field1,field2,field3      xield1,xield2,xield3      dield1,dield2,dield3      gield1,gield2,gield3      Each of these columns will be a parameter to a program, and I would like the program to be called for each line I was hoping for a loop, something like:               for $i in file         command $field2 -x $field3 -PN -$field1 >> output     done      What would be the best way to accomplish something like this in bash?


How can I revert a package to a specific version on Gentoo?

I'm a Debian user pretty much new to Gentoo. I wanted to install a specific version of a package namely the 1.39.0 version of dev-libs/boost, http://packages.gentoo.org/package/dev-libs/boost. But I already did "emerge dev-libs/boost" which installed me version 1.46.1-r1.               machine ~ # emerge --search boost     (...)     *  dev-libs/boost           Latest version available: 1.46.1-r1           Latest version installed: 1.46.1-r1           Size of files: 41,016 kB           Homepage:      http://www.boost.org/           Description:   Boost Libraries for C++           License:       Boost-1.0      How can I revert this package back to version 1.39.0? Thank you in advance.


How to install most recent version of Eclipse via the Terminal

I'm new to Linux and have just been given a VM of Oracle Linux to work with. I need to install Eclipse on it and, after a bit of research, discovered that this could most easily be done with the following command in the Terminal:               sudo yum install eclipse      However, I noticed that this installed Eclipse 3.6.1 (Helios), rather than the more recent Eclipse 4.3.2 (Kepler). I realize that I can just go to the Eclipse website and download the most recent installation, but I'd like to know how to do this from the command line (as an educational experience, plus if I have to do this again I'd like a quick and simple way to do it). How can I install the most recent version, or any particular version, of Eclipse via the Terminal?


Recovering GPG keys from a backup directory

I have a backup image mounted at `/mnt`. I need to recover (and revoke) a key in the secret keyring on this backup. How can I list keys and generate a revocation key for a key stored in this other keyring? When I do:               gpg --homedir /mnt/home/naftuli/.gnupg --list-keys      I see the keys installed locally and not the keys installed in the backup's keyring. What's _really_ strange is that if I `chroot` to the `/mnt` folder and run `gpg --list-keys`, I **still** see the keys in the other keyring. Any ideas?


.Operation not permitted. For root user?

In order to find a workaround for a problem I had yesterday (see the question here) I come out with another experiment. After inserting a flash drive (vfat) and mounting its only partition I wondered: What if I change the permissions on the mount point? Well, that should solve all my problems so I proceed(as root): At first I tried to change the owner:               root# chown root:root /media/MOUNT_POINT      **Note: /media/MOUNT_POINT was created automatically by the system** What a surprise when the command answer was: **Operation not permited.** What? there is things that are not allowed even being root? Ok, that don't sopped me and then tried:               root# chown 000 /media/MOUNT_POINT      this time, no messages, but after               ls -l /media      I got               drwx------  4  miranda miranda 4096 Apr 10 05:41 24EE-9E3C      as you can see, the folder still have all its permissions. I tried all combinations from 000 to 666 (with a script of course) and the result was the same. What's happening? What I'm missing? or even more important. Can this be done? Thanks in advance.


Mysterious Reboot Preventing Debian from Loading

I recently picked up a cheap, oldish computer at a yard sale. It contained a 80GB SATA hard drive with Windows XP, but I want to turn it into a LAN FTP server, so I tried to set up dual-booting Debian on a secondary, 160GB IDE hard drive. The installation itself went fine, returning no errors, and before I installed it I booted Kali from a USB and regular Debian from a LiveCD, both of which worked perfectly. I installed Debian (GNOME) from the same LiveCD that I had previously booted. I have used this same install CD between three and four other times in the last month, once on a dual-booting system, and have yet to experience any issues. The problem arose during "the moment of truth," the first boot. The computer turned on and loaded the GRUB2 boot menu, which contained the expected possible modes in which to run Debian, the memtest options, and Windows XP at the bottom. Upon loading the default value (this also happens with all other potential Debian modes on the list), it says that it's loading linux, and then that it's loading the initial ramdisk, and then, immediately after it finishes that, it powers off completely and restarts. The behavior is exactly equivalent to pressing ctrl+alt+delete and making the computer restart. I also know that it shuts down after booting the initial ramdisk because I have edited in GRUB2 echo commands letting me know that it got past that part before it shut down. I've followed all of the troubleshooting tips in the Debian GNU/Linux Installation Guide, done a fairly extensive search both of this site and Google, and have come up empty-handed. Based on a fair amount of my own troubleshooting, however, I can only assume that it is a hardware issue related to the native install (specifically) of Debian because the live-booted ones worked fine. I have tested the hard drive and it works fine, as does the other one; booting Windows XP from the GRUB2 menu works flawlessly (albeit slowly). Unplugging the secondary SATA hard drive and several other unnecessary drives and peripherals has no effect on the booting, and none of the boot parameters that people generally recommend to clear up boot-time graphics issues helped at all either. I'm totally stumped. The fact that no error messages are returned doesn't help. EDIT: I double checked, and my computer is running a Pentium D processor with 512MB of RAM (32-bits) and exceeds the minimum hardware requirements for Debian that I am installing on it.


Shrink btrfs from /dev/sda to /dev/sda1

suppose I have 2 btrfs filesystems:   1. one mounted on `/mnt/big` spanning across /dev/sda /dev/sdb /dev/sdc /dev/sdd   2. the other mounted on `/mnt/small` on a single drive: /dev/sde How would I shrink the btrfs filesystem lying on /dev/sde to /dev/sde1? The reason I want to do this is that `/mnt/big` is raid1 while `/mnt/small` is not and I would like to extend `/mnt/big`. Thanks!


How to enable printk selectively?

I want to print some statements from kernel but not all. So can I use printk selectively? By selectively I mean I want to enable printk only at particular places and disable it everywhere else. Right now I can only enable (in the kernel configuration enabling printk) or disable it globally; I have no choice at all.


How can I reduce the volume of DenyHosts emails?

As someone who had no experience dealing with Unix or Linux before about 6 months ago, I'm feeling pretty comfortable with managing a Linux server now. The one question I do have is about DenyHosts, and how it's sending out reports. Firstly, I get about 3 to 4 DenyHosts reports **a day**. My first question is, is it really true that that many people are trying to brute-force my server? Every time someone is locked out, I get an email that a host has been denied access, which isn't that important to me, as I'm the only human user on the system. Is there a better way to handle the flood of emails coming to me, or a better way to stop people from trying to gain access to my server? Currently I have all of my `root` email forwarded to an actual email address, so I don't have to login via SSH to read it. (Root login is disabled, so I login as myself and `sudo su` into root. Any insight into this would be much appreciated.