Persist clipboard contents in vi

If I want to copy text from a file in `vi` to another file, I have to highlight the text, `Control-Shift-C` it, quit the first file, open the second, and then paste it via `Control-Shift-V`. It feels like there must be an easier way to do this - that is, keyboard commands only. Any suggestions?


How to stop a background process?

I have started a wget on remote machine in background using `&`. Suddenly it stops downloading. I want to stop its process, then start it again. How can I stop it? I haven't close its shell window. But as you know it doesn't stop using `Ctrl`+`C` and `Ctrl`+`Z`.


linux + sfdisk -s + emcpadm

I have 2 linux machines that are connected to EMC storage VIA fiber cables on the first machine I run the command                  emcadm getused       but from the sfdisk -s command I get only partial partition is it possible to rename the partitions                     /dev/emcpowerg   to  /dev/emcpowera           /dev/emcpowerh   to  /dev/emcpowerb                etc      .               emcpadm getused      PowerPath pseudo device names in use:              Pseudo Device Name      Major# Minor#                   emcpowera         232      0                 emcpowerb         232     16                 emcpowerc         232     32                 emcpowerd         232     48                 emcpowere         232     64                 emcpowerf         232     80                 emcpowerg         232     96                 emcpowerh         232    112                 emcpoweri         232    128                 emcpowerj         232    144                 emcpowerk         232    160                 emcpowerl         232    176          # sfdisk -s      /dev/emcpowerg:  10240000      /dev/emcpowerh:   4608000      /dev/emcpoweri:   4608000      /dev/emcpowerj:  24576000      /dev/emcpowerk:  12288000      /dev/emcpowerl: 379957248      /dev/sda:  71687402      /dev/sdb:  10240000      /dev/sdc:   4608000      /dev/sdd:   4608000      /dev/sde:  24576000      /dev/sdf:  12288000      /dev/sdg: 379957248      /dev/sdh:  10240000      /dev/sdi:   4608000      /dev/sdj:   4608000      /dev/sdk:  24576000      /dev/sdl:  12288000      /dev/sdm: 379957248


raspberry pi keeps killing imagemagicks convert

My raspberry Pi keeps killing imagemagick's `convert` command when I'm resizing images, especially larger images. Is there any way I can prevent this?


How can I embed a console app's output into my X11 desktop?

I'd like to view NetHogs output on my desktop. For example, do any `Conky` or `applets` on Cinnamon exist, so I don't need to have a terminal open all the time?


How are files or chunks delimited on disk?

I'm trying to recover some lost files by `grep`-scanning a hard disk. (The OS is Darwin 11.4.2. The file system is HFS.) How can I determine where a file (or contiguous chunk thereof) begins and ends on disk? I'm thinking of something along the lines of a _generic_ beginning- of-file (BOF) and end-of-file (EOF) sequences. I'm hoping the search could automatically "parse" the scanned content into (at least) coherent chunks (by splitting it at BOF-or-EOF).


Is it possible to add some sort of hook to wget to pre-process HTML returned?

I want to mirror one of my websites. Unfortunately, the site is in its _preview mode_ , and a GET param must be appended to all URLs in the page for it to continue in its preview mode. This GET param was added with JavaScript. Obviously, that does not affect `wget`. Is there a way I can send the returned HTML off to a script to add these myself before `wget` attempts to crawl all the URLs?


System calls, AWK, and Bringing in external inputs

awk '{ TEMPVAR="/usr/bin"; printf("%s", system("ls $TEMPVAR")); }' empty      In this example I'm trying to bring in the variable `TEMPVAR` into the `system` call. How would I do this? What I'm aiming to do: I'm trying to use `date -d $0 +%s` in a `system` call that occurs every line of a file. However, I'm struggling with how to get that `$0` value into the system call.


How to configure which sound card jack2 will use

I've installed `jack2` as a substitution for `jack` from official repositories (I'm on Arch Linux):               # pacman -S jack2      I need to use jack2 because it provides `jackd` (it's needed for another application), while `jack2_dbus` does not provide it. According to this manual, in order to configure such parameters as sampling rate, one should use `jack_control`, but it is available only for `jack2_dbus` (which I cannot use). I also have read this article, but unfortunately, I can't follow it (it was written for `jack`, apparently `jack2` does not include `jackstart` anymore):               [mark@arch ~]$ jackstart -R -d alsa -d hw:1U -p 512 -r 48000 -z s     bash: jackstart: command not found      I would like to somehow set default audio card, because when an application uses jack on my system, it uses card with `0` index and this is not what I want (I want, say, audio card with index `2`). Here is my `~/.asoundrc`:               #     # ALSA Configuration File     #          defaults.ctl.card 2     defaults.pcm.card 2     defaults.dmix.rate 44100     defaults.dmix.channels 2      Is there configuration file that controls which audio card will be used when an application invokes `jackd`? Any other means to set the parameter (and others)?


Run screen command with variable & tick through cron (cron run .sh)

I run screen command through cron, where the codes is in `lorem.sh` files. This is cron codes: `* * * * * cd /home/z; ./lorem.sh` Inside `lorem.sh`:               screen -S screenname -X stuff $'\033[B'     sleep 1 && screen -S screenname -X stuff 2     sleep 1 && screen -S screenname -X stuff "lorem ipsum dolor"     sleep 1 && screen -S screenname -X stuff $'\n'      Above `lorem.sh` codes: First line is "Arrow down", and forth line is "Enter" When running `lorem.sh` through cron, only second & third line working. Above `lorem.sh` works fine if run from terminal by typing `./lorem.sh` but not working from cron


Why does my shell script choke on whitespace or other special characters?

Or, an introductory guide to robust filename handling and other string passing in shell scripts. I wrote a shell script which works well most of the time. But it chokes on some inputs (e.g. on some file names) — I encountered a problem such as the following:   * I have a file name containing a space `hello world`, and it was treated as two separate files `hello` and `world`.   * I have an input line with two consecutive spaces and they shrank to one in the input.   * Leading and trailing whitespace disappears from input lines.   * Sometimes, when the input contains one of the characters `\\[*?`, they are replaced by some text which is is actually the name of files.   * There is an apostrophe `'` (or a double quote `"`) in the input and things got weird after that point.   * There is a backslash in the input (or: I am using Cygwin and some of my file names have Windows-style `\` separators). What is going on and how do I fix it?


How to assign words with spaces as a whole name to variable in shell script?

I need to make some directory of Author name. It's easy when doing them alone. I can simply               mkdir "Mario Luis Garcia"      This will create one directory named "Mario Luis Garcia" But when trying do it massively with shell script, I failed.               for i in "Mario Luis Garcia" "etc.";         do              mkdir $i         done;      This will create 4 separate directories instead of 2. I tried to use `{}`, `()`to enclose the quoted text in. Doesn't work. How to do that?


how to pass asterisk as a parameter to getopts

I wrote a shell scripts with getopts to take arguments. But I want to pass an asterisk as an argument, for example               script -a"Hello * all" -b"Another argument"      if I echo the -a argument from the script it will always output some file names


Preserve formatting when command output is sent to a variable?

I have a bash script. If I run this command to:   1. grep for certain patterns,    2. transform the output,    3. sort the output    4. dedupe the output  then I get one grep find per line in terminal               LC_ALL=C grep -o --color -h -E -C 0 -r "$pattern" /pathto/Pre_N/ | tr -d '[:digit:]' | sort | uniq      However, if I put it in an output variable then the formatting is lost (upon echoing to a file or echoing on screen).               #!/usr/bin/env bash     output=$(LC_ALL=C grep -o --color -h -E -C 0 -r "$pattern" /pathto/Pre_N/ | tr -d '[:digit:]' | sort | uniq)     echo $output > $fn      How can I preserve the formatting of the out put of this command once I save it to a variable?


Problems copying files with spaces inside the file name in a bash script

I have the following function inside a BASH script (running under Ubuntu 12.x), which would copy over a file with spaces inside the file name. It's not working. I've tried many different combinations, with "', with \", etc. How do I get this to work? Thanks!               function copy_docs()     {         source_directory=/mnt/someplace         release_directory=/doc/someotherplace              cp ${source_directory}/"Some file with spaces.txt" ${release_directory}/          }      This is what I'm getting as output (from nearly all permutations):               cp: cannot stat `/mnt/someplace/some': No such file or directory     cp: cannot stat `file': No such file or directory     cp: cannot stat `with': No such file or directory     cp: cannot stat `spaces': No such file or directory


how to get the basename of complicated files

Here is an example of file path:               /isf/GCM/VPfig/Aas/AR/ClCo el Doma Republic/VMN CRTro.txt      What I want to get is the file basename:               VMN CRTro.txt      So I try the following:               echo /isf/GCM/VPfig/Aas/AR/ClCo el Doma Republic/VMN CRTro.txt | sed s'/\// /g' | awk '{print $NF}'     CRTro.txt     <-- not as expected      Or               basename  /isf/GCM/VPfig/Aas/AR/ClCo el Doma Republic/VMN CRTro.txt     basename: extra operand `Doma'     Try `basename --help' for more information.     <-- basename cant handle spaces       What the best way to get the basename of a file with spaces in it?


Rename a file dynamically containing spaces

I want to rename a file dynamically based on data which contains spaces               Name="Abc DEF"     Name1="GHI JKL"          mv /sample/pdf/noriginalName.pdf /sample/outputPdf/${NAME}${Name1}".pdf"      But it gives me an error because it encounters space in between. How can I do this?


How to pass argument with spaces to a shell script function?

I'm trying to pass multiple argument to a function, but one of them is consist of two words and I want shell function to deal with it as one arg:               args=("$@")     function(){      echo ${args[0]}      echo ${args[1]}      echo ${args[2]}     }      when I call this command `sh shell hi hello guys bye` I get this               hi          hello          guys      But what I really want is:               hi      hello guys     bye


Getting expr: syntax error on index

Using this               OF=$(ps fax | grep 'php-fpm: master process' | awk '{print $1}')       IDX=`expr index $OF ' '`      I get an error. The results of the $OF variable are:               27797 27495      What is the error here? I think it has to do with how the variable is being passed into the expression. Also, have tried putting ' quotes around the $OF variable to no avail. That just returns 0 as not found.


Passing Environment Variable to NetworManager GUI

My VPN stoped working when I switched to Centos 7. I narrowed the problem to the lack of MD5 support (not strong enough). I followed this thread, and now I can use open-vpn on the command-line to make a connection. However I still cannot use the Gnome GUI (I did try this but no cigar). Is there a way I can pass environment variables to the NetworkManager GUI? I'm a newbie - so I'm not really sure what happens when I engage the gui, does it run the service under the covers...I kind of doubt it...


RAID mount not happening automatically

I've configured RAID array in my SUSE machine. Everything works just fine as expected. However, I need to mount the RAID array automatically when I boot my system. For this I added the mount point in `/etc/fstab` file. However, after rebooting, I need to do the below two steps.               mdadm -- assemble - scan     mount \dev\md0 \hana      It is not happening automatically as expected. What am I doing wrong?


Force single application to use VPN

I have a linux box (Tonido Plug 2) running Transmission, Sabnzbdplus, Sickbeard, Bind & CouchPotato. I need to configure VPN on the box in such a way that all download / upload activity by transmission routes through VPN and all other traffic go through as normal (i.e. not through VPN). Also I want only the Transmission up and down to be through VPN, ie. the transmission web interface should still be outside of VPN (accessible publicly). My current architecture is:   1. Transmission, Sabnzbdplus, Sickbeard running in their own ports   2. Nginx listens to port 80 and depending on the domain name requests are proxied to one of he above application's ports   3. Port 80 on my modem is forwarded to pot 80 on my plug After implementing VPN:   1. I should still be able to access Transmission, Sabnzbdplus & Sickbeard web interfaces from anywhere in the work over internet without a VPN.   2. Transmission upload and download alone should be through VPN (and only through VPN)   3. My local desktop and devices use bind DNS installed in the plug as DNS server, I don't want this to be screwed up. Any help is appreciated. Thanks in advance.


why is EXPORT PS1 in my .profile getting clobbered?

In this question How can I get KornShell to display the date and time in the prompt? all the variables are visible in ksh except PS1 which appears to be getting replaced somehow. How can I determine what is resetting PS1 After my .profile is processed?


kgdb fail to start

I'm struglling for some time to make kgdb work in my sytsem, but meanwhile it does not. I'm using TI's SDK which based on 2.6.37 git. When trying to work with serial, I always get the following exception: I've tried kgdb in 2 modes, but both fail: **1) from boot:** I added in bootargs with:               "kgdboc=ttyO0,115200 kgdbwait".          ------------[ cut here ]------------     WARNING: at drivers/serial/serial_core.c:399 uart_get_baud_rate+0x124/0x138()     Modules linked in:     Backtrace:     [<c004ffc4>] (dump_backtrace+0x0/0x110) from [<c03ee140>] (dump_stack+0x18/0x1c)      r6:c04f4d9f r5:0000018f r4:00000000 r3:60000013      **2) from console:**               root@dm814x:~# echo ttyS0 > /sys/module/kgdboc/parameters/kgdboc     kgdb: Registered I/O driver kgdboc.               root@dm814x:~# echo g > /proc/sysrq-trigger     SysRq : DEBUG     Entering KGDB     Unable to handle kernel NULL pointer dereference at virtual address 00000000     pgd = c4368000     [00000000] *pgd=84042031, *pte=00000000, *ppte=00000000     Internal error: Oops: 80000007 [#1]     last sysfs file: /sys/module/kgdboc/parameters/kgdboc     KGDB: re-enter exception: ALL breakpoints killed     Backtrace:      The kernel config use:               CONFIG_KGDB          CONFIG_KGDB_SERIAL      Is there any guess what the problem is ? Maybe I need to patch the kernel with kgdb appropriate patch ?


Missing separate debuginfos

I'm trying to debug a code using GDB in a Fedora machine. It produces this message each time I run it.               Missing separate debuginfos, use: debuginfo-install glibc-2.18-12.fc20.x86_64 libgcc-4.8.3-1.fc20.x86_64 libstdc++-4.8.3-1.fc20.x86_64      My questions:   1. Should these packages be in GDB by default?   2. What is the function of each of these packages?   3. In real production environments should these packages be installed for GDB?   4. Is it ok if I do not install these packages? What will be the effect?


unzip a directory in unix

I tried to `unzip` a folder in Unix:               $ unzip sample.zip      This is creating the root structure `a/b/c/d/e/f/sample`. Please advise. I need to `unzip` a folder in the current directory.


RAID configuration disappears after reboot

I am using SUSE to install Hana in my system. I have 2 298 GB HDDs which I am going to configure as RAID 0. I am using **mdadm** to create a RAID array. I use the below command to create the RAID array.               mdadm --create --verbose /dev/md0 --level=stripe --raid-devices=2 /dev/sdb6 /dev/sdc5      After the above step, I am editing the **/etc/mdadm.conf** file to add the entry.               mdadm --detail --scan >> /etc/mdadm.conf      If I check `/proc/mdstat`, I can see that the array is running. Now, I can create a filesystem, on `/dev/md0`. I used the command, `mkfs /dev/md0` I also included it in **/etc/fstab**. However, after rebooting the system, the raid array disappears and mdadm --detail --scan gives me nothing. Is there something missing in the configuration of the RAID?


Sending emails from AutoMySQLBackup from Linux Mint

I have set AutoMySQLBackup on a Linux Mint machine and I want to have the backups sent to an email, but I cannot make it work. I'm new to Linux environment and don't understand it very much. I installed `mutt` and `Postfix`, but I don't know how to config them, so `AutoMySQLBackup` will be able to send the backups to a Gmail account.


X11 module ABI version does not match server's version

When using startx on my 32 bit linux system running debian Jessie, I get the following error:               (EE) module ABI major version (12) doesn't match server's version (15)     (EE) no screens found      `tail /var/log/Xorg.0.log` (Above the information already stated)               Module fbturbo: vendor="X.org foundation"     Compiled for 1.12.4 module version 0.3.1     ABI class: X.org video driver, version 12.1     Failed to load module "fbturbo" (module requirement mismatch"      I did google and found many results, but none of them reference versions 12 and 15 and none relate to Debian. How can I get X11 to work again? Here's the entire xorg.0.log:               [  1035.404]      X.Org X Server 1.15.0.901 (1.15.1 RC 1)     Release Date: 2014-03-21     [  1035.409] X Protocol Version 11, Revision 0     [  1035.411] Build Operating System: Linux 3.13-1-armmp armv7l Raspbian     [  1035.412] Current Operating System: Linux raspi 3.10.37+ #669 PREEMPT Tue Apr 15 14:44:32 BST 2014 armv6l     [  1035.413] Kernel command line: dma.dmachans=0x7f35 bcm2708_fb.fbwidth=1280 bcm2708_fb.fbheight=720 bcm2708.boardrev=0xf bcm2708.serial=0xbc6c8748 smsc95xx.macaddr=B8:27:EB:6C:87:48 sdhci-bcm2708.emmc_clock_freq=250000000 vc_mem.mem_base=0x1ec00000 vc_mem.mem_size=0x20000000  dwc_otg.lpm_enable=0 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait quiet loglevel=0     [  1035.419] Build Date: 06 April 2014  07:54:41AM     [  1035.423] xorg-server 2:1.15.0.901-1 (http://www.debian.org/support)      [  1035.430] Current version of pixman: 0.32.4     [  1035.431]    Before reporting problems, check http://wiki.x.org         to make sure that you have the latest version.     [  1035.432] Markers: (--) probed, (**) from config file, (==) default setting,         (++) from command line, (!!) notice, (II) informational,         (WW) warning, (EE) error, (NI) not implemented, (??) unknown.     [  1035.444] (==) Log file: "/var/log/Xorg.0.log", Time: Wed Apr 23 15:54:06 2014     [  1035.451] (==) Using system config directory "/usr/share/X11/xorg.conf.d"     [  1035.459] (==) No Layout section.  Using the first Screen section.     [  1035.460] (==) No screen section available. Using defaults.     [  1035.460] (**) |-->Screen "Default Screen Section" (0)     [  1035.460] (**) |   |-->Monitor "<default monitor>"     [  1035.467] (==) No device specified for screen "Default Screen Section".         Using the first device section listed.     [  1035.467] (**) |   |-->Device "Allwinner A10/A13 FBDEV"     [  1035.468] (==) No monitor specified for screen "Default Screen Section".         Using a default monitor configuration.     [  1035.468] (==) Automatically adding devices     [  1035.469] (==) Automatically enabling devices     [  1035.469] (==) Automatically adding GPU devices     [  1035.471] (WW) The directory "/usr/share/fonts/X11/misc" does not exist.     [  1035.471]    Entry deleted from font path.     [  1035.472] (WW) The directory "/usr/share/fonts/X11/cyrillic" does not exist.     [  1035.472]    Entry deleted from font path.     [  1035.472] (WW) The directory "/usr/share/fonts/X11/100dpi/" does not exist.     [  1035.473]    Entry deleted from font path.     [  1035.473] (WW) The directory "/usr/share/fonts/X11/75dpi/" does not exist.     [  1035.473]    Entry deleted from font path.     [  1035.475] (WW) The directory "/usr/share/fonts/X11/100dpi" does not exist.     [  1035.475]    Entry deleted from font path.     [  1035.476] (WW) The directory "/usr/share/fonts/X11/75dpi" does not exist.     [  1035.476]    Entry deleted from font path.     [  1035.476] (==) FontPath set to:         /usr/share/fonts/X11/Type1,         built-ins     [  1035.476] (==) ModulePath set to "/usr/lib/xorg/modules"     [  1035.477] (II) The server relies on udev to provide the list of input devices.         If no devices become available, reconfigure udev or disable AutoAddDevices.     [  1035.477] (II) Loader magic: 0xb6f9fef8     [  1035.478] (II) Module ABI versions:     [  1035.479]    X.Org ANSI C Emulation: 0.4     [  1035.479]    X.Org Video Driver: 15.0     [  1035.479]    X.Org XInput driver : 20.0     [  1035.480]    X.Org Server Extension : 8.0     [  1035.483] Initializing built-in extension Generic Event Extension     [  1035.484] Initializing built-in extension SHAPE     [  1035.485] Initializing built-in extension MIT-SHM     [  1035.486] Initializing built-in extension XInputExtension     [  1035.487] Initializing built-in extension XTEST     [  1035.488] Initializing built-in extension BIG-REQUESTS     [  1035.489] Initializing built-in extension SYNC     [  1035.490] Initializing built-in extension XKEYBOARD     [  1035.491] Initializing built-in extension XC-MISC     [  1035.501] Initializing built-in extension SECURITY     [  1035.516] Initializing built-in extension XINERAMA     [  1035.527] Initializing built-in extension XFIXES     [  1035.536] Initializing built-in extension RENDER     [  1035.547] Initializing built-in extension RANDR     [  1035.557] Initializing built-in extension COMPOSITE     [  1035.566] Initializing built-in extension DAMAGE     [  1035.576] Initializing built-in extension MIT-SCREEN-SAVER     [  1035.585] Initializing built-in extension DOUBLE-BUFFER     [  1035.593] Initializing built-in extension RECORD     [  1035.602] Initializing built-in extension DPMS     [  1035.613] Initializing built-in extension Present     [  1035.621] Initializing built-in extension DRI3     [  1035.629] Initializing built-in extension X-Resource     [  1035.638] Initializing built-in extension XVideo     [  1035.646] Initializing built-in extension XVideo-MotionCompensation     [  1035.655] Initializing built-in extension SELinux     [  1035.663] Initializing built-in extension XFree86-VidModeExtension     [  1035.671] Initializing built-in extension XFree86-DGA     [  1035.678] Initializing built-in extension XFree86-DRI     [  1035.686] Initializing built-in extension DRI2     [  1035.687] (II) LoadModule: "glx"     [  1035.692] (II) Loading /usr/lib/xorg/modules/extensions/libglx.so     [  1035.700] (II) Module glx: vendor="X.Org Foundation"     [  1035.701]    compiled for 1.15.0.901, module version = 1.0.0     [  1035.702]    ABI class: X.Org Server Extension, version 8.0     [  1035.703] (==) AIGLX enabled     [  1035.713] Loading extension GLX     [  1035.713] (II) LoadModule: "fbturbo"     [  1035.718] (II) Loading /usr/lib/xorg/modules/drivers/fbturbo_drv.so     [  1035.721] (II) Module fbturbo: vendor="X.Org Foundation"     [  1035.722]    compiled for 1.12.4, module version = 0.3.1     [  1035.723]    Module class: X.Org Video Driver     [  1035.723]    ABI class: X.Org Video Driver, version 12.1     [  1035.731] (EE) module ABI major version (12) doesn't match the server's version (15)     [  1035.731] (II) UnloadModule: "fbturbo"     [  1035.732] (II) Unloading fbturbo     [  1035.733] (EE) Failed to load module "fbturbo" (module requirement mismatch, 0)     [  1035.733] (EE) No drivers available.     [  1035.734] (EE)      Fatal server error:     [  1035.748] (EE) no screens found(EE)      [  1035.756] (EE)      Please consult the The X.Org Foundation support           at http://wiki.x.org      for help.      [  1035.781] (EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information.     [  1035.795] (EE)      [  1035.809] (EE) Server terminated with error (1). Closing log file.


Batch encryption using a public GPG key

I've written a little script for my Clonezilla USB stick which will allow me to quickly back everything up without entering any options by simply running the script. Next, I'd like to store my public GPG key on the stick and add some encryption to my backups like so:               find . -maxdepth 1 -type f -not -iname "*.gpg" | while read file ; do         gpg --encrypt-using-key-file "/path/to/my/keyfile" "$file"         rm "$file"     done      What is the way to properly encrypt files using a public GPG keyfile, ensuring that it doesn't prompt for user input? How would I actually do this?


How to mount software RAID-5 created by Windows under Linux?

At our university we have a Windows FTP server that was implemented with software RAID-5 technology, but we decided to migrate to Linux. How can we mount and modify it under Linux?


rm -r path : how to avoid being asked at each level?

How to avoid being asked at each level if I want to delete that path? I just want to remove everything in a path?


How to upgrade Debian stable (Wheezy) to testing (Jessie)?

I downloaded and installed Debian 7 Wheezy, the stable version, but I would like more recent apps and libs so I'd like to switch to testing version (aka Jessie). How do I proceed?


Upgrade debian from oldstable (squeeze) to unstable (sid)

I am trying to get debian sid. Firstly, I installed a clean squeeze on my hard drive. I replaced everything in my 'sources.list' with 'deb http://ftp.de.debian.org/debian unstable main contrib non-free'. Then I performed these commands: apt-get update (no errors), apt-get dist-upgrade (took 10 minutes, no errors), reboot. But after reboot its version is still 6.0.7. Repeating 'apt-get dist-upgrade' "works" but doesn't change much (or nothing).


Create partition on CentOS server?

I have a headless CentOS server that I'd like to create a new partition on so I have a separate boot and data partition. I have an existing server with the setup that I want to achieve and running fdisk -l looks like this:               Disk /dev/cciss/c0d0: 299.9 GB, 299966445568 bytes     255 heads, 63 sectors/track, 36468 cylinders     Units = cylinders of 16065 * 512 = 8225280 bytes                     Device Boot      Start         End      Blocks   Id  System     /dev/cciss/c0d0p1   *           1          13      104391   83  Linux     /dev/cciss/c0d0p2              14       36468   292824787+  8e  Linux LVM          Disk /dev/cciss/c0d1: 899.8 GB, 899898718208 bytes     255 heads, 63 sectors/track, 109406 cylinders     Units = cylinders of 16065 * 512 = 8225280 bytes                     Device Boot      Start         End      Blocks   Id  System     /dev/cciss/c0d1p1   *           1      109406   878803663+  83  Linux      Here's the same command on my server:               Disk /dev/cciss/c0d0: 587.1 GB, 587128266752 bytes     255 heads, 63 sectors/track, 71380 cylinders     Units = cylinders of 16065 * 512 = 8225280 bytes                     Device Boot      Start         End      Blocks   Id  System     /dev/cciss/c0d0p1   *           1          13      104391   83  Linux     /dev/cciss/c0d0p2              14       71380   573255427+  8e  Linux LVM      I've been told it's not as straightforward as creating a partition and setting mount-points to it because of the additional logical volume layer on CentOS. How can I create a partition without causing problems to the data structure?


Mkfs error undefined symbol: ext2fs_numeric_progress_ops

I'm running a Oracle Linux 6.4 under Hyper-V. I have to add a disk. So I add it in Hyper-V, Linux sees it when I run `fdisk -l` and I can see it. So I did a `fdisk /dev/sdb` then I created an extended partition, started from 1 and let other parameters as default. Then I want to run a `mkfs.ext3 /dev/sdb1` or ext4 (since I don't remember the difference, and I think there is no problem by choosing one or the other). But the `mkfs.ext3` or `mk2efs` or `mkfs -t ext3 /dev/sdb1` output this error:                error symbol lookup : undefined symbol: ext2fs_numeric_progress_ops      I googled that, no answer at all. It never happened to me before. Any help would be greatly appreciated. **UPDATE1** : This is the output of `ldd /sbin/mkfs.ext3`               linux-vdso.so.1 =>  (0x00007fff907fd000)     libext2fs.so.2 => /opt/appassure/lib64/libext2fs.so.2 (0x00007f7c126fc000)     libcom_err.so.2 => /lib64/libcom_err.so.2 (0x0000003290800000)     libblkid.so.1 => /lib64/libblkid.so.1 (0x0000003290c00000)     libuuid.so.1 => /lib64/libuuid.so.1 (0x0000003291800000)     libe2p.so.2 => /lib64/libe2p.so.2 (0x0000003291000000)     libc.so.6 => /lib64/libc.so.6 (0x0000003368e00000)     libpthread.so.0 => /lib64/libpthread.so.0 (0x0000003369200000)     /lib64/ld-linux-x86-64.so.2 (0x0000003368600000)`      And when I run an `e2fsck /dev/sdb1` this is the output :               Error : ext2fs library is outdated !             e2fsck 1.43-WIP (20-Jun-2013)             Using library EXT2FS version 1.42.6, 21-Sept-2012


WARNING: at kernel/irq/handle.c - after changing rootfs, but why?

today I changed from an image with initramfs to an image with separate kernel and rootfs. Theses images are used for an Embedded System (ARM9 SAM9G25), that is runnging with an Linux 2.6.39. During boot I got the following warning, that didn't show up with the initramfs:               WARNING: at kernel/irq/handle.c:130 handle_irq_event_percpu+0x70/0x198()     irq 12 handler atmci_interrupt+0x0/0x6b0 enabled interrupts     Modules linked in:     Backtrace:      [<c0024918>] (dump_backtrace+0x0/0x10c) from [<c01f5664>] (dump_stack+0x18/0x1c)      r6:c005d558 r5:00000009 r4:c028fea8 r3:c02956bc     [<c01f564c>] (dump_stack+0x0/0x1c) from [<c0030f74>] (warn_slowpath_common+0x54/0x6c)     [<c0030f20>] (warn_slowpath_common+0x0/0x6c) from [<c0031030>] (warn_slowpath_fmt+0x38/0x40)      r8:00000000 r7:00000000 r6:0000000c r5:00000001 r4:c7969f60     r3:00000009     [<c0030ff8>] (warn_slowpath_fmt+0x0/0x40) from [<c005d558>] (handle_irq_event_percpu+0x70/0x198)      r3:0000000c r2:c025b447     [<c005d4e8>] (handle_irq_event_percpu+0x0/0x198) from [<c005d6b0>] (handle_irq_event+0x30/0x40)     [<c005d680>] (handle_irq_event+0x0/0x40) from [<c005f274>] (handle_level_irq+0xbc/0xe4)      r4:c02976a8 r3:00020000     [<c005f1b8>] (handle_level_irq+0x0/0xe4) from [<c0021078>] (asm_do_IRQ+0x78/0xa8)      r4:0000000c r3:c005f1b8     [<c0021000>] (asm_do_IRQ+0x0/0xa8) from [<c0021a74>] (__irq_svc+0x34/0x60)     Exception stack(0xc028ff48 to 0xc028ff90)     ff40:                   00000000 0005317f 0005217f 60000013 c028e000 c02ab1a4     ff60: c03b9480 c0291f0c 20000000 41069265 2001c2a8 c028ff9c 600000d3 c028ff90     ff80: c0022748 c0022754 60000013 ffffffff      r5:fefff000 r4:ffffffff     [<c0022714>] (default_idle+0x0/0x44) from [<c0022908>] (cpu_idle+0x70/0xc8)     [<c0022898>] (cpu_idle+0x0/0xc8) from [<c01f37f4>] (rest_init+0x60/0x78) r5:c001d5c4 r4:c0290094     [<c01f3794>] (rest_init+0x0/0x78) from [<c00088c0> (start_kernel+0x23c/0x284)     [<c0008684>] (start_kernel+0x0/0x284) from [<20008038>] (0x20008038)     ---[ end trace 45f8d0076fc9ced3 ]---      I have to say, the system doesn't crash here and boots on as the usual way and is usable in the end (I end up in Busybox - the distro). **What I did:** I created an SD card with 2 FAT32 partitions of ~1 GB each. On the first there are the bootloaders and the kernel and on the second I extracted the rootfs.tar, that was generated with the help of Buildroot 2013.11. The Linux command line looks like this:               console=ttyS0,115200 root=/dev/mmcblk0p2 rootwait rw      (I'm not sure if this belongs to here, but first i couldn't even boot the rootfs at all, since he wasn't able to initialize the mmcblk. Now with the `rootwait` it works just fine). **My question is** : does anyone know where this error comes from? I couldn't find any useful threads anywhere about this. I'd like to remove this error, because I guess it's wasting a bit of time during boot and that's my actual aim: keeping the boot time at the lowest time it could get.


This file must be edited with the 'visudo' command.?

Why it is recommended to edit `/etc/sudoers` file with the `visudo` command? Here is a sample of the file:               ## Sudoers allows particular users to run various commands as     ## the root user, without needing the root password.     ##     ## Examples are provided at the bottom of the file for collections     ## of related commands, which can then be delegated out to particular     ## users or groups.     ##     ## This file must be edited with the 'visudo' command.      Are there any special reasons for it?


Postfix does not respond after "Mail From"

I have a VPS with Linux on it, and Plesk. The `/proc/version` file has (Red Hat 4.4.6-4) in it. The mailer is Postfix, but it isn't working, if I `telnet` in to port 25:   1. I Get the banner   2. I do HELO   3. I get 250 response   4. I do "Mail From: " And at that point Postfix does not respond. I can send additional lines via Telnet, but Postfix never responds. If I kill the `telnet` session, and reconnect, it still responds, so the entire Daemon didn't crash. Does anybody have any clue as to what might be causing Postfix to do this. Any logs to look in, common errors in config files etc.


CUPS printing of pdf files

How can I tell the lpr command (cups) that my file is actually a pdf? `lpr file.pdf` won't print anything.


What does the "(8)" in fsck(8) mean?

*nix commands (and functions?) have a number with them, like `fsck(8)`, `killall(1)`, etc.  What does the number mean?


One of my clients has three EC2 servers on the Amazon cloud, with several attached EBS devices: ![Picture.png](http://img839.imageshack.us/img839/732/picturejt.png) **server 1** and **server 2** are ubuntu micro instances, and **server 3** , the main production box, is a ubuntu large instance. I'm want to create a duplicate of **server 3** but am wondering if there is an advantage of having 4 attached EBS devices as shown, or if it would be simpler / easier to do it with fewer attached devices. I don't know too much of the history of these servers, so I'm looking for insight. I do know that **server 3** runs programs that require `apache, mysql, oracle, java, solr` and maybe a few other services. If I launch a new Ubuntu Large instance I believe it only comes with 7.5 GB of storage - so if I need to store a large database I will need at least 1 other attached EBS device, because I don't think when using Ubuntu's images on EC2 you can increase the size of the main EBS. Is that correct? And, if I add another EBS device to the instance, I will need to do things like change the path of where apps (like mySql and Oracle) store their data - right? My apologies for having a somewhat broad question, but in a nutshell, I'd just like to know: **How should I set up additional EBS storage on an Amazon EC2 instance?**


System Crontab or Root Crontab

System crontab:               /etc/crontab      Root crontab:               sudo crontab -u root -e      Which way is preferred? As they all run tasks within administration privilege.


Slackware, installing Flash and Chrome

I'm having trouble installing flash and chrome. When I download the sources, there are no installers for the packages. All I get is a few folders and .so files. Is there anything out there which shows how to get the latest version of flash via Slackware, or a package manager which has this or something? Any help would be much appreciated. Thank you.


Just curious. The title says it all: Why is Perl installed by default with most Linux distributions?


zram swap instability

I use Mint 13 Maya with mainline kernel 3.6.3 for Ubuntu Quantal on my Asus P53E Notebook. I use zram swap that comes with the package zram-config. I've noticed that using it the system to hangs at random moments, especially (but not always) under high memory loads. Even when 90% of memory is free (and exactly no swap in use) the notebook cannot survive in a powered state a night (8 hours). This "hanging" behaviour is quite literal: the computer respond to exactly nothing. No mouse movement, capslock/numlock leds don't respond to the corresponding keys. Even the sysrq combinations don't work (like "BUSIER"). (I don't remember if dimming the display works). After the hard restart, there is no trace of anything odd in the system logs. This behavior doesn't happen after I shut down the zram-config service. Does it mean, that zram swap is not ready for production? Or is it misconfigured? How can I debug this problem?


setting Cygwin's $HOME to Windows profile directory

Are there any drawbacks to having Cygwin and Windows share the same $HOME directory, in this case the Windows profile directory?


apt-get error 503

I tried installing pyqt4-dev-tools on my machine using the following command:               sudo apt-get install pyqt4-dev-tools      after a few prompts the installation is aborted with the following message:               Err http://archive.ubuntu.com/ubuntu/ precise/main pyqt4-dev-tools i386 4.9.1-2ubuntu1       503  Service Unavailable [IP: 91.189.91.15 80]     Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/p/python-qt4/pyqt4-dev-tools_4.9.1-2ubuntu1_i386.deb  503  Service Unavailable [IP: 91.189.91.15 80]     E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?      I tried running apt-get with `\--fix-missing`, same error. running apt-get update doesn't help either. I'm using linux mint, if it matters any thing.


Selecting/highlighting Text Problem

I am using Backtrack 5. As it is based on Ubuntu 10.04 I decided to ask my question to here: I'm having problems selecting text with my mouse. For example when I try to rename a folder, sometimes I can successfully highlight the text but when I release the mouse button, it is no longer highlighted. Sometimes I can't even successfully highlight the part of the text that I want. It highlights more or less of the text then actually selected. First I thought it was a problem caused by my mouse, however, I tried another mouse and the problem continues. This problem really bothers me while surfing on the net. Could you please help me?


How to enable VESA framebuffer as default in NetBSD 6.1

When booting NetBSD, the old Tecra 720CDT that I have, works quite nicely in 1024x768x15 mode with vesa fb. I always have to activate VESA when booting the system:               > vesa on     > vesa 0x116     > boot netbsd      Now, I was able to somewhat automatize this process by editing `/boot.cfg`:               menu=Boot normally:rndseed /var/db/entropy-file;vesa on;vesa 0x116;boot netbsd      No idea if this is preferable. I'd actually like to set this kind of behavior in the kernel itself. on OpenBSD, I'd simply use `config` to change the kernel settings. That, however, does not work on NetBSD. I'd have to recompile the kernel (that's my understanding). Now, when looking through the config file, I couldn't find things related to vesa or switching to framebuffer mode while booting. Is this even possible? If so, how do I do that?


drm Kernel v>3.11 Issues

Just a regular Fedora 20 user here (coming from no answers on ask.fedoraproject.org). I'm having some issues with the most recent kernel versions. The last working (no black line) kernel I have installed on my machine is v3.11.10-301. The most recent 3.15.8 and 3.15.7 both provide a graphic experience like this: ![](http://i.imgur.com/GUo2tdM.jpg) Notice the big blotchy black line in the centre. My mouse can't go over it, and if it's not clear, the left of what should be my screen is on the right side of the black bar (the KDE settings window is split). I'm almost certain this is a kernel (drm - Direct Rendering Manager) issue because the black line is at the login manager and I get some harmless in- kernel certificate errors (right before drm kicks in according to dmesg) that do not have the black band. While booted here is the dmesg output of   ##  3.11 Kernel (OK) Click here to view the entire output on OneDrive (http://1drv.ms/1uR5Sd3)   Snippet where the DRM is initialised:               [    1.776632] [drm] Initialized drm 1.1.0 20060810     [    1.805399] [drm] radeon kernel modesetting enabled.     [    1.805482] checking generic (c0000000 300000) vs hw (c0000000 10000000)     [    1.805484] fb: conflicting fb hw usage radeondrmfb vs EFI VGA - removing generic driver     [    1.805498] Console: switching to colour dummy device 80x25     [    1.805861] [drm] initializing kernel modesetting (CAICOS 0x1002:0x6779 0x1458:0x2547).     [    1.805886] [drm] register mmio base: 0xFEA20000     [    1.805888] [drm] register mmio size: 131072     [    1.805960] ATOM BIOS: GV     [    1.806468] radeon 0000:01:00.0: VRAM: 1024M 0x0000000000000000 - 0x000000003FFFFFFF (1024M used)     [    1.806471] radeon 0000:01:00.0: GTT: 512M 0x0000000040000000 - 0x000000005FFFFFFF     [    1.806478] [drm] Detected VRAM RAM=1024M, BAR=256M     [    1.806479] [drm] RAM width 64bits DDR     [    1.807090] [TTM] Zone  kernel: Available graphics memory: 4036888 kiB     [    1.807093] [TTM] Zone   dma32: Available graphics memory: 2097152 kiB     [    1.807094] [TTM] Initializing pool allocator     [    1.807100] [TTM] Initializing DMA pool allocator     [    1.807121] [drm] radeon: 1024M of VRAM memory ready     [    1.807122] [drm] radeon: 512M of GTT memory ready.     [    1.807492] [drm] GART: num cpu pages 131072, num gpu pages 131072     [    1.808076] [drm] enabling PCIE gen 2 link speeds, disable with radeon.pcie_gen2=0     [    1.814764] [drm] Loading CAICOS Microcode     [    1.816226] [drm] PCIE GART of 512M enabled (table at 0x0000000000273000).     [    1.816357] radeon 0000:01:00.0: WB enabled     [    1.816360] radeon 0000:01:00.0: fence driver on ring 0 use gpu addr 0x0000000040000c00 and cpu addr 0xffff88022f06fc00     [    1.816362] radeon 0000:01:00.0: fence driver on ring 3 use gpu addr 0x0000000040000c0c and cpu addr 0xffff88022f06fc0c     [    1.817875] radeon 0000:01:00.0: fence driver on ring 5 use gpu addr 0x0000000000072118 and cpu addr 0xffffc900124b2118     [    1.817891] [drm] Supports vblank timestamp caching Rev 1 (10.10.2010).     [    1.817892] [drm] Driver supports precise vblank timestamp query.     [    1.817911] radeon 0000:01:00.0: irq 86 for MSI/MSI-X     [    1.817925] radeon 0000:01:00.0: radeon: using MSI.     [    1.817957] [drm] radeon: irq initialized.     [    1.834446] [drm] ring test on 0 succeeded in 2 usecs     [    1.834511] [drm] ring test on 3 succeeded in 1 usecs     [    1.846465] PM: Starting manual resume from disk     [    1.858815] EXT4-fs (sda2): mounted filesystem with ordered data mode. Opts: (null)     [    1.940264] usb 1-2: New USB device found, idVendor=046d, idProduct=0819     [    1.940268] usb 1-2: New USB device strings: Mfr=0, Product=0, SerialNumber=2     [    1.940270] usb 1-2: SerialNumber: FDC3D2D0     [    2.021537] [drm] ring test on 5 succeeded in 2 usecs     [    2.021543] [drm] UVD initialized successfully.     [    2.021729] [drm] ib test on ring 0 succeeded in 0 usecs     [    2.021778] [drm] ib test on ring 3 succeeded in 0 usecs     [    2.067310] tsc: Refined TSC clocksource calibration: 3311.083 MHz     [    2.174224] [drm] ib test on ring 5 succeeded     [    2.174502] [drm] Radeon Display Connectors     [    2.174504] [drm] Connector 0:     [    2.174506] [drm]   HDMI-A-1     [    2.174507] [drm]   HPD2     [    2.174509] [drm]   DDC: 0x6460 0x6460 0x6464 0x6464 0x6468 0x6468 0x646c 0x646c     [    2.174510] [drm]   Encoders:     [    2.174511] [drm]     DFP1: INTERNAL_UNIPHY1     [    2.174512] [drm] Connector 1:     [    2.174515] [drm]   DVI-D-1     [    2.174516] [drm]   HPD4     [    2.174517] [drm]   DDC: 0x6450 0x6450 0x6454 0x6454 0x6458 0x6458 0x645c 0x645c     [    2.174518] [drm]   Encoders:     [    2.174520] [drm]     DFP2: INTERNAL_UNIPHY     [    2.174521] [drm] Connector 2:     [    2.174522] [drm]   VGA-1     [    2.174523] [drm]   DDC: 0x6430 0x6430 0x6434 0x6434 0x6438 0x6438 0x643c 0x643c     [    2.174524] [drm]   Encoders:     [    2.174526] [drm]     CRT1: INTERNAL_KLDSCP_DAC1     [    2.174611] [drm] Internal thermal controller with fan control     [    2.175497] [drm] radeon: power management initialized     [    2.241696] [drm] fb mappable at 0xC0375000     [    2.241698] [drm] vram apper at 0xC0000000     [    2.241699] [drm] size 4325376     [    2.241700] [drm] fb depth is 24     [    2.241701] [drm]    pitch is 5632      ## 3.15 Kernel (problematic) Click here to view the entire output on OneDrive (http://1drv.ms/1uR67om)   Snippet where the DRM is initialised:               [    1.967740] [drm] Initialized drm 1.1.0 20060810     [    2.000464] [drm] radeon kernel modesetting enabled.     [    2.000521] checking generic (c0000000 300000) vs hw (c0000000 10000000)     [    2.000523] fb: switching to radeondrmfb from EFI VGA     [    2.000542] Console: switching to colour dummy device 80x25     [    2.000877] [drm] initializing kernel modesetting (CAICOS 0x1002:0x6779 0x1458:0x2547).     [    2.000887] [drm] register mmio base: 0xFEA20000     [    2.000888] [drm] register mmio size: 131072     [    2.000941] ATOM BIOS: GV     [    2.001493] radeon 0000:01:00.0: VRAM: 1024M 0x0000000000000000 - 0x000000003FFFFFFF (1024M used)     [    2.001496] radeon 0000:01:00.0: GTT: 1024M 0x0000000040000000 - 0x000000007FFFFFFF     [    2.001498] [drm] Detected VRAM RAM=1024M, BAR=256M     [    2.001499] [drm] RAM width 64bits DDR     [    2.001861] [TTM] Zone  kernel: Available graphics memory: 4036074 kiB     [    2.001863] [TTM] Zone   dma32: Available graphics memory: 2097152 kiB     [    2.001864] [TTM] Initializing pool allocator     [    2.001869] [TTM] Initializing DMA pool allocator     [    2.001897] [drm] radeon: 1024M of VRAM memory ready     [    2.001901] [drm] radeon: 1024M of GTT memory ready.     [    2.001920] [drm] Loading CAICOS Microcode     [    2.002020] [drm] Internal thermal controller with fan control     [    2.002940] [drm] radeon: power management initialized     [    2.003049] [drm] GART: num cpu pages 262144, num gpu pages 262144     [    2.004334] [drm] enabling PCIE gen 2 link speeds, disable with radeon.pcie_gen2=0     [    2.005491] systemd-udevd[260]: renamed network interface eth0 to p4p1     [    2.007763] random: nonblocking pool is initialized     [    2.018756] [drm] PCIE GART of 1024M enabled (table at 0x0000000000273000).     [    2.018844] radeon 0000:01:00.0: WB enabled     [    2.018847] radeon 0000:01:00.0: fence driver on ring 0 use gpu addr 0x0000000040000c00 and cpu addr 0xffff88003e58ac00     [    2.018850] radeon 0000:01:00.0: fence driver on ring 3 use gpu addr 0x0000000040000c0c and cpu addr 0xffff88003e58ac0c     [    2.019232] radeon 0000:01:00.0: fence driver on ring 5 use gpu addr 0x0000000000072118 and cpu addr 0xffffc90011332118     [    2.019234] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).     [    2.019235] [drm] Driver supports precise vblank timestamp query.     [    2.019254] radeon 0000:01:00.0: irq 87 for MSI/MSI-X     [    2.019264] radeon 0000:01:00.0: radeon: using MSI.     [    2.019287] [drm] radeon: irq initialized.     [    2.035904] [drm] ring test on 0 succeeded in 1 usecs     [    2.035961] [drm] ring test on 3 succeeded in 1 usecs     [    2.048416] usb 1-2: New USB device found, idVendor=046d, idProduct=0819     [    2.048419] usb 1-2: New USB device strings: Mfr=0, Product=0, SerialNumber=2     [    2.048421] usb 1-2: SerialNumber: FDC3D2D0     [    2.232955] [drm] ring test on 5 succeeded in 1 usecs     [    2.232961] [drm] UVD initialized successfully.     [    2.232967] tsc: Refined TSC clocksource calibration: 3311.083 MHz     [    2.233352] [drm] ib test on ring 0 succeeded in 0 usecs     [    2.233376] [drm] ib test on ring 3 succeeded in 0 usecs     [    2.403140] usb 3-3: new high-speed USB device number 2 using ehci-pci     [    2.404719] [drm] ib test on ring 5 succeeded     [    2.405156] [drm] Radeon Display Connectors     [    2.405158] [drm] Connector 0:     [    2.405160] [drm]   HDMI-A-1     [    2.405161] [drm]   HPD2     [    2.405163] [drm]   DDC: 0x6460 0x6460 0x6464 0x6464 0x6468 0x6468 0x646c 0x646c     [    2.405164] [drm]   Encoders:     [    2.405165] [drm]     DFP1: INTERNAL_UNIPHY1     [    2.405167] [drm] Connector 1:     [    2.405168] [drm]   DVI-D-1     [    2.405169] [drm]   HPD4     [    2.405170] [drm]   DDC: 0x6450 0x6450 0x6454 0x6454 0x6458 0x6458 0x645c 0x645c     [    2.405171] [drm]   Encoders:     [    2.405172] [drm]     DFP2: INTERNAL_UNIPHY     [    2.405173] [drm] Connector 2:     [    2.405175] [drm]   VGA-1     [    2.405177] [drm]   DDC: 0x6430 0x6430 0x6434 0x6434 0x6438 0x6438 0x643c 0x643c     [    2.405178] [drm]   Encoders:     [    2.405179] [drm]     CRT1: INTERNAL_KLDSCP_DAC1     [    2.471347] [drm] fb mappable at 0xC0474000     [    2.471349] [drm] vram apper at 0xC0000000     [    2.471350] [drm] size 4325376     [    2.471351] [drm] fb depth is 24     [    2.471352] [drm]    pitch is 5632      It's worth noting that   * Occasionally, I get no video with the newer kernels; merely a 2px tall tripe at the top of my screen that does flash with the right colours (because I know the login so well :P).   * Changing GRUB2's gfxpayload setting to "auto" does nothing I'm not a programmer, just a frustrated enthusiast so any help is appreciated.


Mounting Remote Filesystem over SSH as a Different User

Due to a breach of security, the administrators of the work server have implemented a new method of security. To log into the server, we must log in as our own user (which has severely limited permissions), then `su` into another user under which we can do development (which we cannot log in to from the outside). It used to be that we just logged in to a common user which had permissions, and I could simply mount the remote filesystem right onto my local filesystem using `sshfs`. Now that we have to `su` into another user, I can't simply mount it like I have before. I've done a reasonable amount of research and tried all "solutions" I found. I've been trying to make this work for some time. My question is: is there a way to `su` into a different user inside a `sshfs` mount? Perhaps running a script on the server after the mount completes or something? I would use something like this, but I don't have `sudo` access on the server, only `su`. As a side note, my development computer is running LM11, and I'm mounting a share on some old Red Hat server.


How to create an FS under SunOS?

So there is a Global Zone, and we need to create an FS on a Zone that's in the Global Zone. Also we need the new FS in a new DG/Volume inside the DG of the Zone (if we see it from the Global Zone). How to do it? Using vx. (Or at least an authentic howto needed :D )


Undo bg; Undo putting a process into the background?

I've started a long running and machine hog process. I've hit `CTRL-Z` to stop it. I've then put it in the background with `bg`. Oops, I should have restarted with `fg` so that I could easily stop and start it again. What is the easiest way to stop a process that was just put into the background?


sshfs always asking for password in fstab?

I'm trying to enter an sshfs mount in /etc/fstab with the following line:               sshfs#oli@192.168.0.2:/media/usb0 /media/ExtHD fuse     defaults,nonempty,allow_other 0 0      So that this volume is mounted at boot. After booting up, nothing happens, but when I use the command sudo mount -a, I am always prompted for the password. I have set up SSH Keys and transferred them over to the computer at 192.168.0.2, and can log in to regular ssh with no pasword. How can I stop fuse from asking for my password so that the volume can be automatically mounted at boot time? If it helps at all, I am trying to connect to a home server running Debian from a laptop running Arch Linux. Thanks


What is causing this Copy command to enter sleep state?

I am trying to recursively copy a huge directory of installables over 25G and want to preserve the owner and group id, permission modes and so on. So I ran the below commands:               bash-3.2$ date; cp -rpP /source/path/Oracle /target/path/Oracle;date;     Tue Jun  4 09:44:54 EDT 2013          ...      * * * **Some observations:**   * Today (Wed Jun 5 12:09:25 EDT 2013) I notice that it still hasn't completed and appears to be stuck somewhere. I started analyzing the process and it seems to be sleeping:              bash-3.2$ truss -p 09431;     read(10, 0xFFBEF288, 32768)     (sleeping...)        * The last entry also shows that its asleep.              bash-3.2$ pflags 09431     9431:   cp -rpP /source/path/Oracle /target/path/Oracle             data model = _ILP32  flags = RLC|ASYNC|MSACCT|MSFORK             flttrace = 0xfffffbff             sigtrace = 0xfffffeff 0xffffffff             HUP|INT|QUIT|ILL|TRAP|ABRT|EMT|FPE|BUS|SEGV|SYS|PIPE|ALRM|TERM|USR1|USR2|CLD|PWR|WINCH|URG|POLL|STOP|TSTP|CONT|TTIN|TTOU|VTALRM|PROF|XCPU|XFSZ|WAITING|LWP|FREEZE|THAW|CANCEL|LOST|XRES|JVM1|JVM2|RTMIN|RTMIN+1|RTMIN+2|RTMIN+3|RTMAX-3|RTMAX-2|RTMAX-1|RTMAX         entryset = 0x00000401 0x04000000 0x00000000 0x00000028                    0x80000000 0x00000000 0x00000000 0x00000000         exitset  = 0xfffffffe 0xffffffff 0xffffffff 0xffffffd7                    0x7fffffff 0xffffffff 0xffffffff 0xffffffff      /1:    flags = ASLEEP  read(0xa,0xffbef288,0x8000)        * Finally tried `pfiles`              bash-3.2$ pfiles -F 09431     9431:   cp -rpP /source/path/Oracle /target/path/Oracle     Current rlimit: 256 file descriptors     0: S_IFCHR mode:0620 dev:363,0 ino:12582922 uid:502012187 gid:7 rdev:24,3       O_RDWR|O_NOCTTY|O_LARGEFILE       /devices/pseudo/pts@0:3     1: S_IFCHR mode:0620 dev:363,0 ino:12582922 uid:502012187 gid:7 rdev:24,3       O_RDWR|O_NOCTTY|O_LARGEFILE       /devices/pseudo/pts@0:3     2: S_IFCHR mode:0620 dev:363,0 ino:12582922 uid:502012187 gid:7 rdev:24,3       O_RDWR|O_NOCTTY|O_LARGEFILE       /devices/pseudo/pts@0:3     3: S_IFDIR mode:0750 dev:377,1 ino:1135681 uid:502012187 gid:502012187 size:4096       O_RDONLY|O_NDELAY|O_LARGEFILE FD_CLOEXEC       /source/path/Oracle     4: S_IFDIR mode:0750 dev:377,1 ino:1135682 uid:502012187 gid:502012187 size:4096       O_RDONLY|O_NDELAY|O_LARGEFILE FD_CLOEXEC       /source/path/Oracle/Middleware     5: S_IFDIR mode:0750 dev:377,1 ino:14640507 uid:502012187 gid:502012187 size:4096       O_RDONLY|O_NDELAY|O_LARGEFILE FD_CLOEXEC       /source/path/Oracle/Middleware/user_projects     6: S_IFDIR mode:0750 dev:377,1 ino:14640508 uid:502012187 gid:502012187 size:4096       O_RDONLY|O_NDELAY|O_LARGEFILE FD_CLOEXEC       /source/path/Oracle/Middleware/user_projects/epmsystem2     7: S_IFDIR mode:0750 dev:377,1 ino:6480147 uid:502012187 gid:502012187 size:4096       O_RDONLY|O_NDELAY|O_LARGEFILE FD_CLOEXEC       /source/path/Oracle/Middleware/user_projects/epmsystem2/EssbaseServer     8: S_IFDIR mode:0750 dev:377,1 ino:6480149 uid:502012187 gid:502012187 size:4096       O_RDONLY|O_NDELAY|O_LARGEFILE FD_CLOEXEC       /source/path/Oracle/Middleware/user_projects/epmsystem2/EssbaseServer/essbaseserver1     9: S_IFDIR mode:0750 dev:377,1 ino:6480151 uid:502012187 gid:502012187 size:4096       O_RDONLY|O_NDELAY|O_LARGEFILE FD_CLOEXEC       /source/path/Oracle/Middleware/user_projects/epmsystem2/EssbaseServer/essbaseserver1/bin     10: S_IFIFO mode:0660 dev:377,1 ino:9088704 uid:502012187 gid:502012187 size:0       O_RDONLY|O_LARGEFILE       /source/path/Oracle/Middleware/user_projects/epmsystem2/EssbaseServer/essbaseserver1/bin/ESSBASE1_1     11: S_IFREG mode:0660 dev:326,22000 ino:128325 uid:502012187 gid:502012187 size:0       O_WRONLY|O_CREAT|O_TRUNC|O_LARGEFILE       /target/path/Oracle/Middleware/user_projects/epmsystem2/EssbaseServer/essbaseserver1/bin/ESSBASE1_1      * * * **UPDATE:** _Note that the above`cp` process has been killed. So below observations are trying to reproduce the issue._   * **File** that is getting blocked:              bash-3.2$ ls -l ESSBASE1_1     prw-rw----   1 kent   kent         0 Nov 22  2011 ESSBASE1_1        * When I try to cp this file individually:              bash-3.2$ cp ESSBASE1_1 ESSBASE1_1kent  # PID = 08745          ...      it hangs too.   * Looking at `pflags`, it seems to be sleeping.              bash-3.2$ pflags 08745     8745:   cp ESSBASE1_1 ESSBASE1_1kent             data model = _ILP32  flags = MSACCT|MSFORK     /1:    flags = ASLEEP  read(0x3,0xffbf6bc8,0x8000)        * Searching for all other processes using this file              bash-3.2$ fuser -f /source/path/Oracle/Middleware/user_projects/epmsystem2/EssbaseServer/essbaseserver1/bin/ESSBASE1_1     /source/path/Oracle/Middleware/user_projects/epmsystem2/EssbaseServer/essbaseserver1/bin/ESSBASE1_1:     8745o   25057o      Note that the 'o' indicates that the process is using the file as an open file.   * Finding at the processes:               bash-3.2$ pstree | grep 8745      | | |       |--- 09695 kent grep 8745      | |         \--- 08745 kent cp ESSBASE1_1 ESSBASE1_1kent     bash-3.2$ pstree | grep 25057      | | |       \--- 09700 kent grep 25057      | |   |-+- 25057 kent 86:43 /some/path/Oracle/Middlewa      Process with PID 25057 is a server process.   * The open file is on a mount-point. It's a NAS disk.              bash-3.2$ cat /etc/mnttab | grep apps     server1.com:/vol/server1_nec_nosnap0/dev_apps   /source/path/       nfs     rw,xattr,dev=5e40001    1362894854      * * *   * Can anyone help me understand what is causing the copy command to freeze up?   * I can guess that the application is running and that might be in some way preventing any other process from accessing a particular file.    * But in such a scenario I would expect `cp` to abort and throw me an error rather than stay blocked indefinitely.   * As per the update, it seems process `PID=25057` seems to be using the file as an open file. But why does this block the `cp` command?


Configuring Enlightened Sound Daemon

I have a single audio source specified in ALSA as plughw:1,0 (a USB microphone) and I'd like several other processes to be able to access the source simultaneously. For various reasons, each process must see the source as some kind of device, and not as stdin. The process can accept `esd` as an input device. I've been doing some research and the documentation on `esd` is about applying several sources into one output, I guess I'm looking for the reverse. Is this possible, and if so, is there a reference on setting it up? /YR


Cinnamon randomly loses theming

From time to time (quite randomly), Nemo on my Linux Mint 14 Cinnamon starts looking like this ![enter image description here](http://i.stack.imgur.com/w578e.png) When usually it looks like this: ![enter image description here](http://i.stack.imgur.com/dSNt7.png) Restarting Cinnamon (`Alt`+`F2`, `r`, `Enter`) doesn't help, I need to log out, and then log on. Can someone tell me,   * (I guess, that something with X Window System had crashed. `dmesg` doesn't show anything.) how to diagnose, what really happened? ( _update: it seems it is`gnome-settings-daemon` crash_)   * how to restore the normal theme without logging off (which requires closing all programs)?   * how to minimize frequency of such things? * * * Suspicious entries in `xsession-errors.lob`               [0x7f9590006068] main input error: ES_OUT_SET_(GROUP_)PCR  is called too late (pts_delay increased to 300 ms)     [0x7f9590006068] main input error: ES_OUT_RESET_PCR called     [0x7f9590006068] main input error: ES_OUT_SET_(GROUP_)PCR  is called too late (pts_delay increased to 1108 ms)     [0x7f9590006068] main input error: ES_OUT_RESET_PCR called      (...)               [h264 @ 0x7f95790fc160] Missing reference picture     [h264 @ 0x7f95790fc160] decode_slice_header error     [h264 @ 0x7f95790fc160] mmco: unref short failure     [h264 @ 0x7f95790fc160] concealing 1620 DC, 1620 AC, 1620 MV errors     [h264 @ 0x7f95790fc160] Missing reference picture     [h264 @ 0x7f95790fc160] Missing reference picture     [h264 @ 0x7f95790fc160] Missing reference picture      (...)               No such schema 'com.canonical.unity-greeter'      Suspicious entries in syslog:               Jun 13 01:03:45 adam-N56VZ kernel: [49764.694213] gnome-settings-[4198]: segfault at 188b2 ip 00007f2e46acf0a6 sp 00007fff8acb45d0 error 4 in libgdk-3.so.0.600.0[7f2e46a8c000+7c000]     Jun 13 01:03:52 adam-N56VZ gnome-session[4098]: WARNING: Application 'gnome-settings-daemon.desktop' killed by signal 11      (...)               Jun 13 01:40:59 adam-N56VZ laptop-mode: Warning: Configuration file /etc/laptop-mode/conf.d/board-specific/*.conf is not readable, skipping.      * * * Update: It seems, that the this behavior can be reproduced by killing `gnome-settings- daemon`. The question remains on how to restore it? Simply running it as user or root doesn't change anything, even with restarting cinnamon (`Alt`+`F2`, `r`, `Enter`). And the hardest question: how to prevent it from happening? Since it is a crash I guess I'll need to follow the procedure with filing bug report. But who's fault it is? Gnome's or Cinnamon's? Or maybe some other component is at fault here?


i3wm can't create new tiles and mouse won't move

I installed i3wm and X using the tutorials in the Arch wiki for a new Arch installation. I have Intel video, so I installed the xf86-video-intel package (which takes care of the driver). But when I run: `startx` I'm taken to i3 (which I've never used before), but the mouse won't move (I'm running Ubuntu dual boot on this machine and mouse works great there) and when I try to create a new tile (`alt-enter`), the cursor turns into what looks like a clock surrounded by a frame of sorts, and doesn't recover. When I try to exit (`alt-shift-e`), I'm presented with a tab asking me to be sure, which I have to click with my mouse, which isn't moving, so I can't exit without shutting down (i.e., pressing the i/o power button on the laptop). Here is a log from startup. I pressed new window a couple of times and then shut the computer down:               06/05/13 01:08:09 - i3 4.5.1 (2013-03-18, branch "tags/4.5.1") starting     06/05/13 01:08:09 - Parsing configfile /home/tjb1982/.i3/config     deciding for version 4 due to this line: # i3 config file (v4)     06/05/13 01:08:09 - [libi3] libi3/font.c Using X font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1     06/05/13 01:08:09 - Used number 1 for workspace with name 1     06/05/13 01:08:09 - auto-starting i3-config-wizard     06/05/13 01:08:09 - startup id = i3/i3-config-wizard/723-0-arch_TIME0     06/05/13 01:08:09 - executing: i3-config-wizard     06/05/13 01:08:09 - Starting bar process: i3bar --bar_id=bar-hjnjco --socket="/run/user/1000/i3/ipc-socket.723"     06/05/13 01:08:09 - executing: i3bar --bar_id=bar-hjnjco --socket="/run/user/1000/i3/ipc-socket.723"     06/05/13 01:08:09 - Not a managed window, ignoring UnmapNotify event     The config file "/home/tjb1982/.i3/config" already exists. Exiting.     06/05/13 01:08:09 - IPC: looking for config for bar ID "bar-hjnjco"     06/05/13 01:08:09 - workspace visible? fs = 0x1bdb0f0, ws = 0x1bdb0f0     06/05/13 01:08:09 - WM_CLASS changed to i3bar (instance), i3bar (class)     06/05/13 01:08:09 - WM_NAME changed to "i3bar for output LVDS1"     06/05/13 01:08:09 - Using legacy window title. Note that in order to get Unicode window titles in i3, the application has to set _NET_WM_NAME (UTF-8)     06/05/13 01:08:09 - This window is of type dock     06/05/13 01:08:09 - Checking window 0x00a00007 (class i3bar)     06/05/13 01:08:09 - dock status does not match     06/05/13 01:08:09 - Checking window 0x00a00007 (class i3bar)     06/05/13 01:08:09 - dock status matches     06/05/13 01:08:09 - ClientMessage for window 0x0000009e     06/05/13 01:08:26 - startup id = i3/i3-sensible-terminal/723-1-arch_TIME366852     06/05/13 01:08:26 - executing: i3-sensible-terminal     06/05/13 01:08:26 - Not a managed window, ignoring UnmapNotify event     06/05/13 01:08:28 - startup id = i3/i3-sensible-terminal/723-2-arch_TIME368252     06/05/13 01:08:28 - executing: i3-sensible-terminal     06/05/13 01:08:28 - Not a managed window, ignoring UnmapNotify event     06/05/13 01:08:30 - startup id = i3/i3-sensible-terminal/723-3-arch_TIME370387     06/05/13 01:08:30 - executing: i3-sensible-terminal     06/05/13 01:08:30 - Not a managed window, ignoring UnmapNotify event     06/05/13 01:08:31 - startup id = i3/i3-sensible-terminal/723-4-arch_TIME371331     06/05/13 01:08:31 - executing: i3-sensible-terminal     06/05/13 01:08:31 - Not a managed window, ignoring UnmapNotify event     [libi3] libi3/font.c Using X font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1      Contents of ~/.i3/config (replaced `#` with `;` for markdown legibility [which I didn't need to do, but I'm leaving it anyway):               ; i3 config file (v4)     ;     ; Please see http://i3wm.org/docs/userguide.html for a complete reference!     ;     ; This config file uses keycodes (bindsym) and was written for the QWERTY     ; layout.     ;     ; To get a config file with the same key positions, but for your current     ; layout, use the i3-config-wizard     ;          ; Font for window titles. Will also be used by the bar unless a different font     ; is used in the bar {} block below. ISO 10646 = Unicode          font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1          ; The font above is very space-efficient, that is, it looks good, sharp and     ; clear in small sizes. However, if you need a lot of unicode glyphs or     ; right-to-left text rendering, you should instead use pango for rendering and     ; chose a FreeType font, such as:     ; font pango:DejaVu Sans Mono 10          ; use Mouse+Mod1 to drag floating windows to their wanted position     floating_modifier Mod1          ; start a terminal     bindsym Mod1+Return exec i3-sensible-terminal          ; kill focused window     bindsym Mod1+Shift+q kill          ; start dmenu (a program launcher)     bindsym Mod1+d exec dmenu_run     ; There also is the (new) i3-dmenu-desktop which only displays applications     ; shipping a .desktop file. It is a wrapper around dmenu, so you need that     ; installed.     ; bindsym Mod1+d exec --no-startup-id i3-dmenu-desktop          ; change focus     bindsym Mod1+j focus left     bindsym Mod1+k focus down     bindsym Mod1+l focus up     bindsym Mod1+semicolon focus right          ; alternatively, you can use the cursor keys:     bindsym Mod1+Left focus left     bindsym Mod1+Down focus down     bindsym Mod1+Up focus up     bindsym Mod1+Right focus right          ; move focused window     bindsym Mod1+Shift+j move left     bindsym Mod1+Shift+k move down     bindsym Mod1+Shift+l move up     bindsym Mod1+Shift+semicolon move right          ; alternatively, you can use the cursor keys:     bindsym Mod1+Shift+Left move left     bindsym Mod1+Shift+Down move down     bindsym Mod1+Shift+Up move up     bindsym Mod1+Shift+Right move right          ; split in horizontal orientation     bindsym Mod1+h split h          ; split in vertical orientation     bindsym Mod1+v split v          ; enter fullscreen mode for the focused container     bindsym Mod1+f fullscreen          ; change container layout (stacked, tabbed, toggle split)     bindsym Mod1+s layout stacking     bindsym Mod1+w layout tabbed     bindsym Mod1+e layout toggle split          ; toggle tiling / floating     bindsym Mod1+Shift+space floating toggle          ; change focus between tiling / floating windows     bindsym Mod1+space focus mode_toggle          ; focus the parent container     bindsym Mod1+a focus parent          ; focus the child container     ;bindsym Mod1+d focus child          ; switch to workspace     bindsym Mod1+1 workspace 1     bindsym Mod1+2 workspace 2     bindsym Mod1+3 workspace 3     bindsym Mod1+4 workspace 4     bindsym Mod1+5 workspace 5     bindsym Mod1+6 workspace 6     bindsym Mod1+7 workspace 7     bindsym Mod1+8 workspace 8     bindsym Mod1+9 workspace 9     bindsym Mod1+0 workspace 10          ; move focused container to workspace     bindsym Mod1+Shift+1 move container to workspace 1     bindsym Mod1+Shift+2 move container to workspace 2     bindsym Mod1+Shift+3 move container to workspace 3     bindsym Mod1+Shift+4 move container to workspace 4     bindsym Mod1+Shift+5 move container to workspace 5     bindsym Mod1+Shift+6 move container to workspace 6     bindsym Mod1+Shift+7 move container to workspace 7     bindsym Mod1+Shift+8 move container to workspace 8     bindsym Mod1+Shift+9 move container to workspace 9     bindsym Mod1+Shift+0 move container to workspace 10          ; reload the configuration file     bindsym Mod1+Shift+c reload     ; restart i3 inplace (preserves your layout/session, can be used to upgrade i3)     bindsym Mod1+Shift+r restart     ; exit i3 (logs you out of your X session)     bindsym Mod1+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -b 'Yes, exit i3' 'i3-msg exit'"          ; resize window (you can also use the mouse for that)     mode "resize" {             ; These bindings trigger as soon as you enter the resize mode                  ; Pressing left will shrink the window’s width.             ; Pressing right will grow the window’s width.             ; Pressing up will shrink the window’s height.             ; Pressing down will grow the window’s height.             bindsym j           resize shrink width 10 px or 10 ppt             bindsym k           resize grow height 10 px or 10 ppt             bindsym l           resize shrink height 10 px or 10 ppt             bindsym semicolon   resize grow width 10 px or 10 ppt                  ; same bindings, but for the arrow keys             bindsym Left        resize shrink width 10 px or 10 ppt             bindsym Down        resize grow height 10 px or 10 ppt             bindsym Up          resize shrink height 10 px or 10 ppt             bindsym Right       resize grow width 10 px or 10 ppt                  ; back to normal: Enter or Escape             bindsym Return mode "default"             bindsym Escape mode "default"     }          bindsym Mod1+r mode "resize"          ; Start i3bar to display a workspace bar (plus the system information i3status     ; finds out, if available)     bar {             status_command i3status     }          ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;     ; automatically start i3-config-wizard to offer the user to create a     ; keysym-based config which used his favorite modifier (alt or windows)     ;     ; i3-config-wizard will not launch if there already is a config file     ; in ~/.i3/config.     ;     ; Please remove the following exec line:     ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;     exec i3-config-wizard


VNC send Ctrl+Alt+F1-F6 to server

I've been trying to figure this out now for a while, I'm connecting to virtual machines through VNC, and by default you get a graphical or ncurses interface, and `CTRL`+`ALT`+`F3` takes you to a console with debug information. However, Gentoo intercepts these commands. How can I pass them through to the VNC server? Edit: Some more details the VNC is being ran on the VM host, thus it just captures display output from the VM and sends any keys to the VM as if it's an actual keyboard connected to it. Hence I can switch to the TTY's if my `CTRL`+`ALT`+`F1`-`F6` keystrokes were getting through (Works fine when on Windows for example).


Command that highlights regex in text?

Is there a command that highlights a certain expression in text? I'm looking for something like the 'search' function in less, but with normal text output on stdout, instead of the `less` viewer. Example:               $ cat test.txt | highlight "an"      > Prospects for **an** orderly NATO withdrawal from Afgh **an** ist **an** > suffered two setbacks as President Hamid Karzai dem **an** ded limits on > United States troops **an** d the Talib **an** halted peace talks. It could use color or any other means to highlight the specified regular expression.


Tracking which files are used by program

I am looking for a way to track which files are used by program installer(InstallAnywhere). I cannot use `lsof` because as far as I know it works on active processes and I want a tool which will work something like that:               Time:     --------------------------------------------------------     Tool start here:        |-------------------------------------------|     Installer starts here:           |-----------------------------------|


Vim - how to increase each number in visual block?

I have the following SQL:               update am.PERMISSIONS set PRM_ORDER = 35 PRM_VISIBLE = b'1' where PRM_ID = 3;     update am.PERMISSIONS set PRM_ORDER = [35] PRM_VISIBLE = b'1' where PRM_ID = 7;     update am.PERMISSIONS set PRM_ORDER = [40] PRM_VISIBLE = b'1' where PRM_ID = 10;     update am.PERMISSIONS set PRM_ORDER = [45] PRM_VISIBLE = b'1' where PRM_ID = 11;     ...      with square brackets I select the visual block, where i want to increase each number by 5. How do I do this?


LibreOffice from RPM looks ugly

I'm using x86-64 Fedora 18 (my desktop is KDE), that ships with LibreOffice 3.6. I wanted to install LibreOffice 4.0, thus I installed the RPMs (from here). It works, but looks ugly. Compare:   1. LibreOffice 4.0 (from the RPMs): ![enter image description here](http://i.stack.imgur.com/RyAd8.png)   2. LibreOffice 3.6 (from the repos): ![enter image description here](http://i.stack.imgur.com/dFGld.png) I checked in the options of LibreOffice, disabled the high-contrast theme but didn't work. Here it suggests to install the package `pangox-compat`, but it's already installed. How can I fix it?


remove content of directory in elegant way

I would like to remove all content of the current working directory. How to do it in efficient and elegant way? I have several files, directories and some of them starts with dot, like:               touch .abc; touch abcd ; mkdir foobar; touch "file name" "#"      I am looking for posix compatible, elegant solution, to make this directory empty. I will post some of my ideas, but none of them are perfect.


grub rescue prompt after boot-repair

I want to run Windows 8 and Linux Mint 15 in dual boot. After installing Mint I could no longer boot Windows 8. After running boot-repair from a USB device I can't boot either of them anymore. I just get a grub rescue prompt preceded by               error: no such device: 44d9d480-e343-437e-9384-03495c5d89de.      This is the boot-repair log URL: http://paste2.org/nEhbEbUk Why am I receiving this error? What can I do to fix it? _I originally posted this question here:http://askubuntu.com/questions/307030/grub-rescue-prompt-after-boot- repair but was advised to ask it here_


Can't boot live USB of Linux Mint DE on my UEFI PC

I used the Universal USB Installer application to copy the latest ISO image from Linux Mint DE (64 bits) and install it on my PC, however when I try to reboot it I have the option to choose my connected USB device as "UEFI: ... USB ..." but when I choose it it doesn't do anything, the screen goes black for a couple seconds then loads windows 7 normally. Should I do something before trying to boot into the USB device? This is my first time trying to install a linux distro on a UEFI-based PC I never had a problem like this before. Thanks in advance.


iSCSI on startup

I've configure iSCSI but CentOS 6.3 is unable to recognize if on startup. Here is fstab config:               /dev/sdb1               /home                   ext4    _netdev         0 0      Here is iscsi.conf settings:               node.startup = automatic     node.session.auth.username =      node.session.auth.password =     discovery.sendtargets.auth.username =     discovery.sendtargets.auth.password =      Here is initiatorname.iscsi: iqn.2004-04.com.iscsi:iscsi:iscsi.start.8cff69 Here is chkconfig:               iscsid          0:off   1:off   2:on    3:on    4:on    5:on    6:off      Any help please. dmesg is not showing errors. My question is that centos 6.3 is unable to initialize and boot with iscsi. I've to process it manually. Yes both iscsi and iscsid are enabled on start up. How can i check / configure initramfs .. any manual?


How to re-size partitions in a complete hard drive image?

I have taken a complete image of a hard drive using:               dd if=/dev/sda of=/home/user/harddriveimg bs=4M      It would seem to me, that I should be able to re-size the partitions within it after suitably mounting it. As I am less than familiar with the command line parted, I tried:               gparted /home/user/harddriveimg      While this loaded the partition table, it couldn't find the partitions themselves, e.g. harddriveimg0. Is it possible to modify an image file like this, without writing it back to some disk, and if so how? I would be perfectly happy with a solution that uses only terminal commands.


Convert file path to URI in bash

How can I convert a file path to an URI in the command-line? **Example** :               /home/MHC/directory with spaces and ümläuts      to               file:///home/MHC/directory%20with%20spaces%20and%20%C3%BCml%C3%A4uts


RLIMIT_NPROC suddenly overwhelmed

In a small script I have, I'm starting a shell and then setting RLIMIT_NPROC on it to some small number, like 5, using prlimit Then, I try to execute a shell script that only contains:               #!/bin/bash     echo hi     sleep 3      by sending "./test.sh\n" through stdin and waiting for the result. At the same time, I'm using `ps --ppid <somepid> -o pid=` to list the child PIDs of the first. This always fails with the error `bash: fork: retry: No child processes`. I've tried setting the limit to RLIM_INFINITY to see how many child processes are created, but only one is listed (naturally the shell processing test.sh). How can I properly limit the number of child processes (or more generally, restrict some sort of fork bomb)? I know about cgroups and other similar alternatives, but I'm trying to write this to learn, and this behavior really confuses me. I think it might be due to RLIMIT_NPROC's documentation stating that it limits "The maximum number of processes (or, more precisely on Linux, threads)" and large numbers of threads being created, but the program only works once I increase RLIMIT_NPROC up to 500 or so, and that doesn't seem very reasonable. If this behavior is unexpected, it might be a coding error, in which case I'll try to clean up the testing code to post on here.


Listing script's file dependencies

Given a shell script, is there an easy way to extract what files it manipulates explicitly (so not like concatenating some command and than eval- ing it)? E.g.                #!/bin/bash          . /etc/someconfig.cfg              cat /somedir/somefile.txt              cp /otherdir/file1.txt /tmp/fileABC.txt              rm -f ~/stupidfile.txt              #EOF      Is there a command that would extract the explicit dependencies so that I don't have to parse the script or do it manually and get output like:               /etc/someconfig.cfg         /somedir/somefile.txt     /otherdir/file1.txt      /tmp/fileABC.txt     ~/stupidfile.txt      ? Thanks


Can't see my ssd drive when booting using grub on a usb pen

I installed debian on my laptop and everything was fine (I may need to mention that I'm using LVM) until I reached the grub point. Since I have a GPT partition he refuses to install properly. I skipped that stage and I just installed grub on a pen drive in order to boot on linux. The pendrive boots successfully but when I hit the console and try to boot my kernel there is no way I can see my ssd drive. Here is what I'm trying:   1. From the grub console: `insmod lvm`   2. Then: `set root=(<tab>` but the autocomplete shows me hd0 **_only_** which is the pendrive itself.   3. GRUB+LVM wiki suggests I should type something like `set root=lvm/volumegroup-volume` and so did I. Then, when I try to do `linux /boot/vmlinux etcetc` the command fails and it tells me `error: disk 'lvm/group-vol not found'` [I obviously used the proper names instead of group-vol] My laptop is a samsung series 7 ultrabook. Any hints on why is that so? UPDATE: I booted with the netinst again and entered the rescue console. I mounted my disk and copied the initrd and vmlinuz on my usb pendrive. I can now boot BUT it stops when it tries to find the root device with something like: > Gave up waiting for root device. Common problems: > >   * Boot args [etc etc] >   * Missing modules [etc etc] ALERT! /dev/mapper/group-vol does not exist. > > > Dropping to a shell! Apparently, the initrd doesn't have all the modules needed to handle the LVM. I'm kind of lost because I copied the initrd created by Debian during the installation, the one expected to work...


No wireless on my Dell Inspiron 1545 Ubuntu

I had installed Ubuntu 12.10 a few months back but never really used wireless device. I did use wireless before that when I had windows installed on my Dell, but then I switched to Ubuntu and the option for Wireless never worked. I used to work with LAN network till now and that worked just fine, but now since I have relocated, I have dongle for my internet but now I want to share this over a wireless network which I am unable to figure out. Here's a couple of things that may help regarding this : The snapshot ![enter image description here](http://i.stack.imgur.com/vixzh.jpg) shows no wireless option here. Also the result of `lshw -class network` is                *-network                       description: Ethernet interface        product: 88E8040 PCI-E Fast Ethernet Controller        vendor: Marvell Technology Group Ltd.        physical id: 0        bus info: pci@0000:09:00.0        logical name: eth0        version: 13        serial: 00:23:ae:34:46:d2        capacity: 100Mbit/s        width: 64 bits        clock: 33MHz        capabilities: pm msi pciexpress bus_master cap_list ethernet physical tp     10bt 10bt-fd 100bt 100bt-fd autonegotiation        configuration: autonegotiation=on broadcast=yes driver=sky2     driverversion=1.30 latency=0 link=no multicast=yes port=twisted pair        resources: irq:45 memory:f69fc000-f69fffff ioport:de00(size=256)      * _EDIT 1 *_               lspci     00:00.0 Host bridge: Intel Corporation Mobile 4 Series Chipset Memory     Controller Hub (rev 07)     00:02.0 VGA compatible controller: Intel Corporation Mobile 4 Series Chipset     Integrated Graphics Controller (rev 07)     00:02.1 Display controller: Intel Corporation Mobile 4 Series Chipset     Integrated Graphics Controller (rev 07)     00:1a.0 USB controller: Intel Corporation 82801I (ICH9 Family) USB UHCI     Controller #4 (rev 03)     00:1a.1 USB controller: Intel Corporation 82801I (ICH9 Family) USB UHCI     Controller #5 (rev 03)     00:1a.2 USB controller: Intel Corporation 82801I (ICH9 Family) USB UHCI     Controller #6 (rev 03)     00:1a.7 USB controller: Intel Corporation 82801I (ICH9 Family) USB2 EHCI     Controller #2 (rev 03)     00:1b.0 Audio device: Intel Corporation 82801I (ICH9 Family) HD Audio     Controller (rev 03)     00:1c.0 PCI bridge: Intel Corporation 82801I (ICH9 Family) PCI Express Port     1 (rev 03)     00:1c.1 PCI bridge: Intel Corporation 82801I (ICH9 Family) PCI Express Port     2 (rev 03)     00:1c.2 PCI bridge: Intel Corporation 82801I (ICH9 Family) PCI Express Port     3 (rev 03)     00:1c.4 PCI bridge: Intel Corporation 82801I (ICH9 Family) PCI Express Port     5 (rev 03)     00:1d.0 USB controller: Intel Corporation 82801I (ICH9 Family) USB UHCI     Controller #1 (rev 03)     00:1d.1 USB controller: Intel Corporation 82801I (ICH9 Family) USB UHCI     Controller #2 (rev 03)      00:1d.2 USB controller: Intel Corporation 82801I (ICH9 Family) USB UHCI     Controller #3 (rev 03)     00:1d.7 USB controller: Intel Corporation 82801I (ICH9 Family) USB2 EHCI     Controller #1 (rev 03)     00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev 93)     00:1f.0 ISA bridge: Intel Corporation ICH9M LPC Interface Controller (rev     03)     00:1f.2 SATA controller: Intel Corporation 82801IBM/IEM (ICH9M/ICH9M-E) 4     port SATA Controller [AHCI mode] (rev 03)     00:1f.3 SMBus: Intel Corporation 82801I (ICH9 Family) SMBus Controller (rev     03)     09:00.0 Ethernet controller: Marvell Technology Group Ltd. 88E8040 PCI-E     Fast Ethernet Controller (rev 13)


How to know which Linux kernel versions Qt 4.7 supports

I'd like to develop Qt 4.7 based applications running on my arm-linux MCU. However, I'm not sure if this Qt 4.7 supports the following two things:   1. my Linux 2.6.37 kernel   2. my Ti3530-cortexA8 MCU. I know it's hard to get a conclusion here so I'd like to know where I can find such references.


Permission error to access mounted directory in localhost

OK, I formatted my flash to **ext4** file system, changed all the permissions to **777** and mounted it to **/var/www/html/web**. Now, when i access **localhost/web** it gives the following error: "You don't have permission to access /web/cv on this server." But when I normally access localhost it loads index.html that locates in /var/www/html directory, it means it has to do with mounting of flash. Can't I hold my web directory inside my flash card in Linux? Why it gives permission error, maybe it could be related to Apache server? All guesses and solutions would be greatly appreciated. BTW I am using **Redhat Linux Enterprise Server 6**


Fix "firefox is already running" issue in Linux

I am trying to open Firefox in CentOS, but I'm getting the following message: > Firefox is already running but is not responding and Firefox doesn't open. I tried this in command line:               kill Firefox      but it didn't work. Also, I don't know in which directory I must execute the right commands. How can I fix this?


Query Firefox password database

Braiam said that Firefox stores the password data for login websites in `~/.mozilla/firefox/key3.db` and `~/.mozilla/firefox/signons.sqlite` files. These files can be read with some sqlite editor. I try to query for my username and password of a website (e.g. https://sourceforge.net/account/login.php) from the Firefox's database. I can't do it through Firefox, because my Firefox GUI is not working, and I am fairly new to and also interested in learning using databases to do the job.   1. what are the different roles of `key3.db` and `signons.sqlite`?   2. I searched on the internet, and is it correct that I should use `sqlite3` to open a database?              $ sqlite3 key3.db      SQLite version 3.7.9 2011-11-01 00:52:41     Enter ".help" for instructions     Enter SQL statements terminated with a ";"     sqlite> .tables     Error: file is encrypted or is not a database      I guess the reason of failure is that, in Firefox, I set up a master keyword to access the passwords it stores. How should I proceed to query the password of a given website? Btw, my OS is Ubuntu, and if it helps, here is the file type of `key3.db` :              $ file key3.db      key3.db: Berkeley DB 1.85 (Hash, version 2, native byte-order)        3. What shall I read and learn in order to query the password from a given website name?  Will reading http://www.sqlite.org/cli.html help? * * * To garethTheRed: I tried your command. ~~Not return anything however.~~ The output is abysmal:               $ sqlite3 signons.sqlite     SQLite version 3.7.9 2011-11-01 00:52:41     Enter ".help" for instructions     Enter SQL statements terminated with a ";"     sqlite> .tables     moz_deleted_logins  moz_disabledHosts   moz_logins             sqlite> select * from moz_logins;     ...     55|https://sourceforge.net||https://sourceforge.net|form_loginname|form_pw|MDIEEPgAAAAAAAAAAAAAAAAAAAEwF\AYIKoZIhvcNAwcECCPrVdOzWamBBAjPs0DI8FrUnQ==|MDoEEPgAAAAAAAAAAAAAAAAAAAEwFAYIKoZIhvcNAwcECCnZved1LRQMBBBV\DtXpOvAp0TQHibFeX3NL|{16e782de-4c65-426f-81dc-ee0361816262}|1|1327675445094|1403706275829|1327675445094|\4     ...      Does Firefox encrypt passwords regardless of if there is a master key? If yes, can we decrypte them in command line (my firefox CLI may still work)? Alternatively, is it possible that Chrome browser can read and import the passwords stored by Firefox?


Point program without garbaging up alias (~/.bashrc)

What is the correct way to point to a program/script without passing the command through aliases in the bashrc? For example: I create a custom script _MyScript.sh_.   I wish to create a command that can be run globally from shell by typing `scripty`, which would point to my script ( _MyScript.sh_ ). Is there a way to accomplish this? (The only way I know is creating aliases) If there is a "more correct way" to do this I would appreciate knowing how.


wget internal buffer size

I'm constantly using `wget` to download many files over 1GB each. I'm getting concerned about how this may be straining my HDD. Can `wget`'s internal buffer size be modified so that it writes to my HDD less often? What about `curl`?


Run a program when start an activity

Is there a way to run a program when specific activity starts on KDE 4.8.9? PD.: KDE has a feature called Activity. It is designed for change your desktop settings. For example, KDE has some Activities by default like Desktop, Desktop Icons, Photos Activity, ... and each takes different Energy Saving Settings, wallpaper, ...