title: dark image in Skype but without a problem in other apps

text: I've just moved to Linux Family. I installed Elementary OS 64bit (based on Ubuntu). I try to configure my Skype, but the video image is really dark. It is working, but it is low in contrast. I've downloaded Cheese and the image there is great. I've download Guvcview and the image there is great as well. But, when I run the guvcview, I have a lot of errors in terminal. The weird is that when I have guvcview opened with the great image and open the preview of Skype camera, then then image of the first one gets darker too.               guvcview 1.5.3          (guvcview:19393): Gtk-WARNING **: Theme parsing error: gtk-widgets.css:756:1: Expected semicolon          (guvcview:19393): Gtk-WARNING **: Theme parsing error: gtk-widgets.css:776:0: Expected a valid selector          (guvcview:19393): Gtk-WARNING **: Theme parsing error: button.css:150:14: Not using units is deprecated. Assuming 'px'.          (guvcview:19393): Gtk-WARNING **: Theme parsing error: button.css:150:14: Junk at end of value          (guvcview:19393): Gtk-WARNING **: Theme parsing error: granite-widgets.css:144:14: Not using units is deprecated. Assuming 'px'.          (guvcview:19393): Gtk-WARNING **: Theme parsing error: granite-widgets.css:144:16: Not using units is deprecated. Assuming 'px'.          (guvcview:19393): Gtk-WARNING **: Theme parsing error: granite-widgets.css:144:22: Not using units is deprecated. Assuming 'px'.          (guvcview:19393): Gtk-WARNING **: Theme parsing error: toolbar.css:110:13: Not using units is deprecated. Assuming 'px'.          (guvcview:19393): Gtk-WARNING **: Theme parsing error: toolbar.css:110:13: Junk at end of value     ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear     ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe     ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side     ALSA lib audio/pcm_bluetooth.c:1614:(audioservice_expect) BT_GET_CAPABILITIES failed : Input/output error(5)     ALSA lib audio/pcm_bluetooth.c:1614:(audioservice_expect) BT_GET_CAPABILITIES failed : Input/output error(5)     ALSA lib audio/pcm_bluetooth.c:1614:(audioservice_expect) BT_GET_CAPABILITIES failed : Input/output error(5)     ALSA lib audio/pcm_bluetooth.c:1614:(audioservice_expect) BT_GET_CAPABILITIES failed : Input/output error(5)     ALSA lib pcm_dmix.c:957:(snd_pcm_dmix_open) The dmix plugin supports only playback stream     Cannot connect to server socket err = No such file or directory     Cannot connect to server socket     jack server is not running or cannot be started     video device: /dev/video0      Init. TOSHIBA Web Camera - HD (location: usb-0000:00:1a.0-1.3)     { pixelformat = 'YUYV', description = 'YUV 4:2:2 (YUYV)' }     { discrete: width = 640, height = 480 }         Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5,      { discrete: width = 320, height = 240 }         Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5,      { discrete: width = 176, height = 144 }         Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5,      { discrete: width = 160, height = 120 }         Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5,      { discrete: width = 352, height = 288 }         Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5,      { discrete: width = 1280, height = 720 }         Time interval between frame: 1/10, 1/5,      { discrete: width = 1280, height = 800 }         Time interval between frame: 1/10, 1/5,      { pixelformat = 'MJPG', description = 'MJPEG' }     { discrete: width = 640, height = 480 }         Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5,      { discrete: width = 320, height = 240 }         Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5,      { discrete: width = 176, height = 144 }         Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5,      { discrete: width = 160, height = 120 }         Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5,      { discrete: width = 352, height = 288 }         Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5,      { discrete: width = 1280, height = 720 }         Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5,      { discrete: width = 1280, height = 800 }         Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5,      { pixelformat = 'RGB3', description = 'RGB3' }     { discrete: width = 640, height = 480 }         Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5,      { discrete: width = 320, height = 240 }         Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5,      { discrete: width = 176, height = 144 }         Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5,      { discrete: width = 160, height = 120 }         Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5,      { discrete: width = 352, height = 288 }         Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5,      { discrete: width = 1280, height = 720 }         Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5,      { discrete: width = 1280, height = 800 }         Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5,      { pixelformat = 'BGR3', description = 'BGR3' }     { discrete: width = 640, height = 480 }         Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5,      { discrete: width = 320, height = 240 }         Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5,      { discrete: width = 176, height = 144 }         Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5,      { discrete: width = 160, height = 120 }         Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5,      { discrete: width = 352, height = 288 }         Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5,      { discrete: width = 1280, height = 720 }         Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5,      { discrete: width = 1280, height = 800 }         Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5,      { pixelformat = 'YU12', description = 'YU12' }     { discrete: width = 640, height = 480 }         Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5,      { discrete: width = 320, height = 240 }         Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5,      { discrete: width = 176, height = 144 }         Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5,      { discrete: width = 160, height = 120 }         Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5,      { discrete: width = 352, height = 288 }         Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5,      { discrete: width = 1280, height = 720 }         Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5,      { discrete: width = 1280, height = 800 }         Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5,      { pixelformat = 'YV12', description = 'YV12' }     { discrete: width = 640, height = 480 }         Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5,      { discrete: width = 320, height = 240 }         Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5,      { discrete: width = 176, height = 144 }         Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5,      { discrete: width = 160, height = 120 }         Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5,      { discrete: width = 352, height = 288 }         Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5,      { discrete: width = 1280, height = 720 }         Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5,      { discrete: width = 1280, height = 800 }         Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5,      vid:04ca      pid:7012      driver:uvcvideo     checking format: 1196444237     VIDIOC_G_COMP:: Inappropriate ioctl for device     fps is set to 1/25     drawing controls          no codec detected for H264     no codec detected for MP3 - (lavc)     Checking video mode 640x480@32bpp : OK


title: simple hostname resolution on LAN

text: I read this question How to make a machine accessible from the LAN using its hostname What is the simplest way to enable a LAN of Linux hosts to identify each other by hostname? Obviously each host will still require an IP address, but how do you make sure hosts can recognize eachother by hostname? Is this possible without nmap, setting up a DHCP server, or installing `avahi`?


title: How can I resolve local IPs to hostnames?

text: > **Possible Duplicate:**   >  How to make a machine accessible from the LAN using its hostname I have is a simple home network with a few machines connecting through DHCP. If everyone and their respective devices are all home and active I'll have about 15 active IPs. I would like to be able to identify hosts on the network by name. I am not interested in solutions involving static IPs or permanent DHCP leases. Ideally, it should be transparent to the user and any new machine connected to my LAN should be able to access any other by name. It should be cross-platform. My LAN has Linux, OSX, iOS and the occasional windows machine. I'm not too bothered if it doesn't work in windows but I'd like to have it in the rest at least. I realise I can set up a local DNS server but I'm hoping there is a simpler solution that I am not aware of (avahi? NIS?). So, is a local DNS server the best way to go about this?


title: How to read NTFS drives in Linux (RHEL 6)?

text: My system is on dual boot. I have installed both RHEL 6 and win7 in it. I use RHEL mostly and I want to use my windows' NTFS drive in RHEL. How can I do it? Tell me the procedure. ![enter image description here](http://i.stack.imgur.com/cTRv8.png)


title: Linux LXC vs FreeBSD jail

text: Are there any notable differences between LXC (Linux containers) and FreeBSD's jails in terms of security, stability & performance? On first look, both approaches look very similar.


title: recursively copy only images and preserve path

text: I'm working on a website migration. I have a scrape of the site, with all the files and directory structure as you would see them in the URL. I want to pull all images, maintaining the directory structure, and copy them into a new place. For instance, if I have               /content1/index.php     /content1/page2.php     /content1/images/image1.jpg     /content1/images/image2.jpg     /content1/background/spacer.gif     /content1/background/background.gif     /content2/index.php     /content2/images/image3.jpg     /content2/background/spacer.gif     /content2/background/background.gif      Then I want               /content1/images/image1.jpg     /content1/images/image2.jpg     /content1/background/spacer.gif     /content1/background/background.gif     /content2/images/image3.jpg     /content2/background/spacer.gif     /content2/background/background.gif      I can use the `find` command to get a list of only image files, but I don't know how to manipulate each file while preserving the directory path to it. I could make a copy of the entire directory, and then recursively delete any non-image file, but now that I have set this problem before myself, I figure its worthwhile to know how to do it, in case I really do need to do it this way later.


title: Extract multiple .tar.gz files with a single tar call

text: I was wondering whether (and, of course, how) it’s possible to tell `tar` to extract multiple files in a single run. I’m an experienced Unix user for several years and of course I know that you can use `for` or `find` or things like that to call `tar` once for each archive you want to extract, but I couldn’t come up with a working command line that caused my `tar` to extract two .tar.gz files at once. (And no, there’s nothing wrong with `for`, I’m merely asking whether it’s possible to do without.) I’m asking this question rather out of curiosity, maybe   * there’s a strange fork of `tar` somewhere that supports this   * someone knows how to use the `-M` parameter that `tar` suggested to me when I tried `tar -zxv -f a.tgz -f b.tgz`   * we’re all blind and it’s totally easy to do — but I couldn’t find any hint in the web that didn’t utilize `for` or `find` or `xargs` or the like. Please don’t reply with `tar -zxvf *.tar.gz` (because that does **not** work) and only reply with “doesn’t work” if you’re absolutely sure about it (and maybe have a good explanation _why_ , too). **Edit:** I was pointed to an answer to this question on Stack Overflow which says in great detail that it’s not possible without breaking current `tar` syntax, but I don’t think that’s true. Using `tar -zxv -f a.tgz -f b.tgz` or `tar -zxv --all-args-are-archives *.tar.gz` would break no existing syntax, imho.


title: How to tell if a file is being downloaded by wget?

text: I use `wget` to download files (most are zip files) automatically for me during the night. However, sometimes in the morning I find that a few files cannot be unzipped. I don't know why this is happening, perhaps it's something wrong with the remote server. I want to write a script to test zip files in my download folder periodically using 'unzip -t', but I don't want to test on the files that are being downloaded. So how can I tell if a file is being used by `wget`?


title: Grant permissions using rysnc

text: I want to use `rsync` (as a user) from "me" on a local computer to "another" user on a distant computer. However, I also want "another" user (on the distant computer) to own the files and to be able to use them exactly as "me" (on the local computer). I believe I shall play with the options: `-p` (preserve permissions), `-g` (preserve groups) and `-o` (preserve ownership), but I'm not sure of the exact effect of those. Which one(s) shall I impose ?


title: Tips for making software updates automatic in OpenSuse (zypper)

text: I'm currently working in a command line only environment. I would like to perform daily updates automatically using `zypper`, however I can't find a good way to do it. By good I mean clean and simple. Is it safe to execute `sudo zypper update` daily using cron? I was told that this isn't always a good way to do it. Are there other ways I could make package updates through zypper completely automatic?


title: Why is root in wheel and operator? Can root being in a group ever make a difference?

text: I just noticed on my FreeBSD machine that root is in wheel and operator. I'm trying to think of a situation where UID 0 being in a group would have any effect on... well... anything, and I'm coming up blank. For that matter, does root even need a primary login group in /etc/passwd? Or does login(3) choke and die if the user has a blank primary group field? (To clarify: I understand the purpose of the "root" group's existence, since files need a group owner. I'm not understanding how it matters that the user root/toor/whatever has that group membership.) Is this just cruft from decades ago, or is there a real reason for it?


title: losing unicode support urxvt when logged in as user, root shell has them

text: I am on a minimal debian testing install. I've set up `rxvt-unicode`, `herbstluftwm`, and `SLiM`. With my username, after SLiM logs me in, all of the `urxvt` terminal instances i start lack unicode support. If I do `sudo urxvt`, then the new urxvt instance shows unicode characters in the terminal (as root). This is a new install in a vm. Before I set up SLiM, I had unicode support as a user. at some point afterwards, I no longer saw the characters. Can anyone please assist? This issue seems **very** similar to this question, but I wasnt able to see any similar actions I could take. * * * relevant configs: ### SLiM               default_path        /usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games     default_xserver     /usr/bin/X11/X     xserver_arguments   -nolisten tcp         halt_cmd            /sbin/shutdown -h now     reboot_cmd          /sbin/shutdown -r now     console_cmd         /usr/bin/xterm-C -fg white -bg black +sb -T "Console login" -e /bin/sh -c "/bin/cat /etc/issue.net; exec /bin/login"         xauth_path         /usr/bin/X11/xauth         authfile           /var/run/slim.auth     numlock             on         # hidecursor          false            login_cmd           exec /bin/bash -login ~/.xinitrc %session     # login_cmd           exec /bin/bash -login /etc/X11/Xsession %session            # sessionstart_cmd  some command     # sessionstop_cmd   some command             # daemon    yes            sessiondir            /usr/share/xsessions/         screenshot_cmd      scrot ~/img/slim.png             welcome_msg         Welcome to %host             # session_msg         Session:              shutdown_msg       The system is halting...     reboot_msg         The system is rebooting...             default_user       seldon              focus_password      yes             auto_login          yes         current_theme       debian-joy         lockfile            /var/run/slim.lock     logfile             /var/log/slim.log      ### User env               SHELL=/bin/bash     TERM=rxvt-unicode-256color     XDG_SESSION_COOKIE=f71ffba1619e7393bb13421e5323c9ee-1394949532.816048-1558277790     WINDOWID=23068679     USER=seldon     MAIL=/var/mail/seldon     PATH=/home/seldon/bin:/usr/local/bin:/usr/bin:           /bin:/usr/local/games:/usr/games:/home/seldon/bin     PWD=/home/seldon     LANG=en_US.utf8     COLORFGBG=default;default     SHLVL=1     HOME=/home/seldon     LS_OPTIONS=--color=auto --group-directories-first     LOGNAME=seldon     DISPLAY=:0.0     COLORTERM=urxvt     XAUTHORITY=/home/seldon/.Xauthority     _=/usr/bin/env      ### Root env               SHELL=/bin/bash     TERM=rxvt-unicode-256color     WINDOWID=20971527     USER=root     SUDO_USER=seldon     SUDO_UID=1000     USERNAME=root     MAIL=/var/mail/root     PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/root/bin     PWD=/home/seldon     LANG=en_US.utf8     SHLVL=1     COLORFGBG=default;default     SUDO_COMMAND=/usr/bin/rxvt     HOME=/root     LS_OPTIONS=--color=auto --group-directories-first     LOGNAME=root     SUDO_GID=1000     DISPLAY=:0.0     COLORTERM=urxvt     XAUTHORITY=/home/seldon/.Xauthority     _=/usr/bin/env      ### Xresources               !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!     !! Terminal Colors     !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!          ! ... removed for brevity ...                    !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!     !! URxvt Config      !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!          ! buffer     URxvt*saveLines: 12000          ! fonts     URxvt*font: xft:DejaVu Sans Mono:pixelsize=12:antialias=true:hinting=true     URxvt*boldFont: xft:DejaVu Sans Mono:bold:pixelsize=12:antialias=true:hinting=true          ! URxvt*font: xft:Bitstream Vera Sans Mono:pixelsize=12:antialias=true:hinting=true     ! URxvt*boldFont: xft:Bitstream Vera Sans Mono:bold:pixelsize=12:antialias=true:hinting=true               ! transparency     ! URxvt*transparent: true     ! URxvt*shading: 25          URxvt*depth: 32     URxvt.background: [75]#000000          ! scrollbars     !    active - true (default) or false     URxvt*scrollBar: false          !    position - left=false (default) or right=true     URxvt*scrollBar_right: false          !    style - rxvt (default), plain, next, or xterm     URxvt*scrollstyle: rxvt          ! borders     URxvt*borderless: true      ### xinitrc               #!/bin/bash          xrandr -s 8         hsetroot -fill /home/seldon/img/olCTXdz.jpg &              function wm() {             xrdb -load ~/.Xresources &             compton -cb -o0             exec $1 -c /home/seldon/.config/herbstluftwm/autostart         }          [[ -z $1 ]] && wm herbstluftwm          wm $1


title: debhelper and fun question about dh_make

text: I create an distro about 6 years ago, i recall i used `dh_make command`, i have a suggesstion for creating distro recently, When i use :               root@debian:/home/mohsen# dpkg -L debhelper |egrep dh_make     /usr/bin/dh_makeshlibs     /usr/share/man/man1/dh_makeshlibs.1.gz     /usr/share/man/es/man1/dh_makeshlibs.1.gz     /usr/share/man/fr/man1/dh_makeshlibs.1.gz     /usr/share/man/de/man1/dh_makeshlibs.1.gz      I'm confused.Why `dh_make` doesn't exist? I decide to use `debian installer` ,`debhelper` and `deboostrap`, But i don't know dh_make has been eliminated?


title: Is LXLE more resource-intensive than Lubuntu?

text: I'm using Lubuntu on an Acer Aspire One. It works well, and I'm happy with it. Recently, however, I came across the Lubuntu-derived LXLE distribution and it looks interesting. But I'm wondering whether all the added eye candy, etc. makes the distribution use more memory and/or slows down (other) applications.


title: How can I force bash to deallocate a brace expanded variable without name?

text: For benchmarking, I ran the command:               for i in {1..100000000}; do        echo "$i" line >> file     done      Bash expanded the braces and stored the list `1 2 3 4 5 6 ... 100000000` in memory. I thought this will somehow deallocated at a point. After all, it's a temporary variable. A couple of days have since passed and the `bash` process is still occupying 17.9GB of memory. Can I force bash to clear these temporary variables? I cannot use `unset`, because I don't know the variable name. (obviously `unset i` doesn't help) Of course, a solution is to close the shell and open a new one.


title: Is it possible to rename Thunar's side pane default items?

text: ![enter image description here](http://i.stack.imgur.com/upaBD.png) I would like to display a different name of these items - that would indicate for example that one is windows partition, other ubuntu, etc. Is it feasible?


title: Linux can't read and write, but windows can

text: I have a hard drive with a lot of back up files, that were created by PhotoRec. When mounting it with a windows computer I can read all the files perfectly fine. Under linux I get an error when trying to look at the folder that contains all my backups. The rest of the hard drive is perfectly readable but when I try to ls the backup folder I get `ls: reading directory .: Input/output error` In Dolphin I just see a blank directory. I have tried letting arch auto mount and I have tried manually mounting it with `-t ntfs-3g` option (only flag used). A strange thing I notice is that if I manually mount it with the 3g option then all permissions are `-rwxrwxrwx` but if I let it be automatically mounted I have permissions `-rw------- 1 steven steven` (some have 2, but not many. The directories show `d` as they should). These are the same for every file and directory on the system. I don't understand why I can't see these files under Linux, but can under Windows. I even booted up SystemRescueCD again to see if it recognized it, but it couldn't even see the files (even though it was what had originally written the files in the first place). What is so weird to me is that I can read everything on the hard drive except that one folder. It has the exact same permissions as everything else in the hard drive. Additional info: This is a fresh install of Arch. As of today. `[steven@serenity ~]$ uname -a Linux serenity 3.16.1-1-ARCH #1 SMP PREEMPT Thu Aug 14 07:40:19 CEST 2014 x86_64 GNU/Linux` (auto mounted)               [steven@serenity ~]$ sudo fdisk -l          Disk /dev/sdb: 596.2 GiB, 640135028736 bytes, 1250263728 sectors     Units: sectors of 1 * 512 = 512 bytes     Sector size (logical/physical): 512 bytes / 512 bytes     I/O size (minimum/optimal): 512 bytes / 512 bytes     Disklabel type: dos     Disk identifier: 0x1549f232          Device     Boot Start        End    Sectors   Size Id Type     /dev/sdb1  *       63 1250258159 1250258097 596.2G  7 HPFS/NTFS/exFAT


title: complete KVM / libvirt breakdown after OS upgrade (openSUSE)

text: I have upgraded two E-350 systems which have been running VMs (one of the systems only Linux VMs, the other one Windows VMs) to openSUSE 13.1 (i.e kernel 3.11.10, kvm-1.6.0, libvirt-1.1.2). After a few seconds the VMs crash, in different ways:   1. (The already installed Linux and Windows VMs) Linux is doing magic, not in the positive sense though. I am not kidding: I have a **zombie** process which consumes a whole CPU core (at least according to `top`):              3673 3 qemu 20 0 0 0 0 Z 100,1 0,000 2:07.08 [qemu-system-x86] <defunct>      I need `kill -9` to get rid of it.   2. (The Linux / Windows DVD) The systems boots for a few seconds and then just stops. The `qemu` process is still around but it has less than 50 MiB resident memory and 0% CPU usage - but is shown as alive yet. Attaching with `strace` shows:              futex(0x7f433536fac0, FUTEX_WAIT_PRIVATE, 2, NULL      This happens both directly after the upgrade to openSUSE 13.1 and after installing the patches. I have disabled AppArmor but that influenced the crash by a few seconds only.


title: What's a safe and portable way to split a string in shell programming?

text: When writing a shell script, I often want to split a string. Here's a very simple example:               for dir in $(echo $PATH | tr : " "); do         [[ -x "$dir"/"$1" ]] && echo $dir     done      This will search each directory in the $PATH for an executable with the same name as `$1`. Pretty straightforward, it runs well, but breaks if a directory in my $PATH contains a whitespace in its name. **What's the recommended way to split a string at the occurrence of a recurrent separator?** Ideally, the solution would be able to run on (fairly) old shells, namely ksh88.


title: History command in ksh not able to use

text: I am using the ksh shell. I am not getting any impact of these following commands. It is executing without any error but it is not giving the proper results.               export HISTTIMEFORMAT='%F %T '      Use the `Up` arrow to view the previous command and press enter to execute it. Type `!!` and press `Enter` from the command line. Type `!-1` and press `Enter` from the command line. Press `Control`+`P` will display the previous command, press `Enter` to execute it. Basically I am not to do anything other than basic history command.


title: How can I quickly return back to the last working directory?

text: All too often I find myself cycling between two directories to perform different tasks. The directories don't always have an easy-to-use relative path between them. As a result it is quite cumbersome to have to specify a directory path that is essentially the previous working directory. Is there a command by which I can easily return back to the previous working directory?


title: Wireless interface only reachable when ethernet cable plugged in

text: I'm facing a problem that's about to drive me crazy. I'm running a Debian Linux distribution and currently trying to establish a connection to my wireless network (WPA2 security, wpa_supplicant already installed). The wireless dongle connects to the network, but it only responds to pings and lets me connect through SSH from another computer when the ethernet cable is plugged in. It is still reachable via wireless connection after unplugging the ethernet connection, but it won't work until a connection to a wired network had been created. I'm not sure if anything's wrong with my configuration here... Output of 'ifconfig wlan0':               wlan0     IEEE 802.11bgn  ESSID:"*censored*"  Nickname:"<WIFI@REALTEK>"               Mode:Managed  Frequency:2.457 GHz  Access Point: *censored*                 Bit Rate:72.2 Mb/s   Sensitivity:0/0                 Retry:off   RTS thr:off   Fragment thr:off               Encryption key:****-****-****-****-****-****-****-****   Security mode:open               Power Management:off               Link Quality=89/100  Signal level=58/100  Noise level=0/100               Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0               Tx excessive retries:0  Invalid misc:0   Missed beacon:0      Contents of /etc/network/interfaces               auto lo     iface lo inet loopback          allow-hotplug eth0     iface eth0 inet static         address 192.168.178.130         netmask 255.255.255.0          allow-hotplug wlan0     iface wlan0 inet static         wpa-ssid "*censored*"         wpa-key-mgmt WPA-PSK         wpa-group TKIP CCMP         wpa-psk *censored*         address 192.168.178.131         netmask 255.255.255.0         gateway 192.168.178.1


title: How will GUI applications behave if there is no system tray?

text: Currently I'm running Openbox and I have no need for a pane. However, I know that some applications, like network managers etc, like to place themselves in the system tray - either by default or when minimized. What would happen if something would try to minimize itself to a nonexistent tray?


title: Apt-get, no sudoers file

text: I am trying to install a module using apt-get. I do the following:   sudo apt-get install      But I get the following error:   sudo: can't stat /etc/sudoers: No such file or directory   sudo: no valid sudoers sources found, quitting      I have been trying to google the answer but can't find any solution to the problem. How can I solve this?


title: Simulating GNU Screen's shelltitle in tmux

text: I'm trying to simulate GNU Screen's `shelltitle` feature in tmux. I have the following in my `~/.bashrc`:               if [[ "$TERM" == screen* ]]; then         SCREEN_ESC='\[\ek\e\\\]'     else         SCREEN_ESC=''     fi          PS1="\n\w ${SCREEN_ESC}$ "      and the following in my `~/.screenrc`:               shelltitle        "$ |bash"      Setting `shelltitle` makes GNU Screen search for a newline in the shell and strip away all the characters from `$PS1` upto the escape character, and replace it with the first word found after that. This is more clearly explained in the man page: > Here's how it works: you must modify your shell prompt to output a null > title-escape-sequence (<esc>k<esc>) as a part of your prompt. The last part > of your prompt must be the same as the string you specified for the search > portion of the title. Once this is set up, screen will use the title-escape- > sequence to clear the previous command name and get ready for the next > command. Then, when a newline is received from the shell, a search is made > for the end of the prompt. If found, it will grab the first word after the > matched string and use it as the command name. If the command name begins > with either '!', '%', or '^' screen will use the first word on the following > line (if found) in preference to the just- found name. This is different from tmux's `set-option -g set-titles on` which only captures the process name. So a Python script `script.py` would be titled as `script.py` in Screen (which is the way I want it) whereas, it would be titled as `python` in tmux (which I don't want.) I know that one can rename tmux windows by:               printf '\033kWINDOW_NAME\033\\'      So I was wondering if there is some way I can alternatively let tmux know that I've entered a new command. If there is some way I can get the last command entered, I could use Bash's `PROMPT_COMMAND` to do this. Any ideas?


title: Realtek RTL8188CE don't appear while installing Linux Mint

text: When I logged in to the installer, I found that my wireless wasn't working. This is strange because in every other Linux Mint installation I've done, wireless cards are recognized automatically, I continued the installation until the end using ethernet, when I logged in, I couldn't turn on Wi-Fi. So I went to the magical google.ca and found the command `inxi -n` which returned this:                Network:        Card-1: Realtek RTL8101E/RTL8102E PCI Express Fast Ethernet controller driver: r8169                 IF: eth0 state: up speed: 100 Mbps duplex: full mac: e8:40:f2:f0:65:57          Card-2: Realtek RTL8188CE 802.11b/g/n WiFi Adapter driver: rtl8192ce                 IF: wlan0 state: down mac: 74:e5:43:3b:c2:38      The important bit being the second part, where it says state: down I looked around a bit more and found a script, which when ran, this caught my eye:                0: phy0: Wireless LAN         Soft blocked: no          Hard blocked: yes


title: sudo hangs indefinitely without prompting for password

text: When I logged back into my Ubuntu desktop after an update, my display driver was seemingly unavailable and I was met with vt-7's output. I changed to a different terminal and logged in. However, when I attempted to use sudo to install a display driver, sudo hung forever. No prompt for a password, Ctrl+c Ctrl+d Ctrl+z all didn't do anything. It ate my virtual terminal. I changed to another one and the same thing happened. What's happening? ## Update ### /etc/pam.d/sudo               #%PAM-1.0     auth required pam_env.so readenv=1 user_readenv=0     auth required pam_env.so readenv=1 envfile=/etc/default/locale user_readenv=0     @include common-auth     @include common-account     @include common-session-noninteractive      Other commands such as ifconfig also seem to hang. ## Update 2 I think that this breakage has to do with the fact that Ubuntu tried to upgrade a kernel with an earlier verison. I was running kernel 3.7.1 which I downloaded and installed manually, and Ubuntu did a dist-upgrade which "upgraded" the kernel to 3.2.X. I have a feeling that this messed things up substantially. I'm going to try reinstalling the kernel and see if I can undo some of the fallout. Note to self: always disable Ubuntu kernel updates when running a later kernel.


title: how to disable USB devices based on vendor id in Linux environment?

text: I want to disable usb devices based on vendor id in Linux environment. I want to allow only specific USB devices, based on vendor id.


title: Problems with basename in a loop

text: I am new at shell script programming and I'm trying to execute a software that reads a text and perform it's POS tagging. It requires an input and an output, as can be seen in the execute example:               $ cat input.txt | /path/to/tagger/run-Tagger.sh > output.txt      What I'm trying to do is to execute this line not only for a text, but a set of texts in an specific folder, and return the output files with the same name as the input files. So, I tried to do this script:               #!/bin/bash     path="/home/rafaeldaddio/Documents/"     program="/home/rafaeldaddio/Documents/LX-Tagger/POSTagger/Tagger/run-Tagger.sh"          for arqin in '/home/rafaeldaddio/Documents/teste/*'     do     out=$(basename $arqin)     output=$path$out     cat $arqin | $program > $output     done      I tried it with only one file and it works, but when I try with more than one, I get this error:               basename: extra operand ‘/home/rafaeldaddio/Documents/teste/3’     Try 'basename --help' for more information.          ./scriptLXTagger.sh: 12: ./scriptLXTagger.sh: cannot create /home/rafaeldaddio/Documents/: Is a directory      Any insights on what I'm doing wrong? Thanks.


title: Clickable PDFs in rxvt

text: I would like to open PDFs (say, with `evince`) by clicking in the terminal. The setup is `urxvt` in Fedora 19 here, but if `urxvt` cannot do this, can you let me know which terminal emulators can. I got URL detection working by putting:               urxvt*perl-lib: /usr/libi64/urxvt/perl/     urxvt*perl-ext-common: default,matcher     urxvt*matcher.button: 1     urxvt*url-launcher: /usr/bin/xdg-open      Into my `~/.Xdefaults` and running `xrdb -load ~/.Xdefaults`, so hopefully there is some similar solution for the problem at hand.


title: How to get RPM's that has been published after the install DVD?

text: So if I download a:               SL-63-x86_64-2012-08-02-Install-DVD.iso      and install it, and give out a "yum update" - then it will find many-many XY packages to update. **Q:** are there any methods/solutions to get these XY rpm's? (and then I can put them in the: "/var/cache/yum/x86_64/6.3/" - because internet connection is not too fast.)


title: HTTP Downloader that supports directory index? So that I could use globbing?

text: Is there an `http` downloader that supports `globbing`? i.e. I would like to fetch the latest update of a package, `abc-XXX.rpm`, but the `XXX` (version number) is unknown to me. Is it possible to do a `globbing` on directory index of the remote server?


title: How can I create a virtual ethernet interface on a machine without a physical adapter?

text: I have a Dell XPS 13 ultrabook which has a wifi nic, but no physical ethernet nic (wlan0, but no eth0). I need to create a virtual adapter for using Vagrant with NFS, but am finding that the typical `ifup eth0:1...` fails with `ignoring unknown interface eth0:1=eth0:1`. I also tried creating a virtual interface against `wlan0`, but received the same result. How can I create a virtual interface on this machine with no physical interface?


title: Header about MIME email

text: Morning, can some body help me about MIME email? I want to send HTML email like this:               MIME-Version: 1.0     Content-type: multipart/alternative; boundary=lazuardi     --lazuardi      After that email. I have html email.               Content-type: text/html; charset=UTF-8     <html>     <body>     ......     This is HTML message     </body>     </html>     --lazuardi      Then i also include plain text               Content-type: text/plain     this is plain text message     --lazuardi--      My question is, am I wrong that I include header in my body.html? Where should I put the header? I using Mutt email client, everytime I send the email, mutt always give me this message: No boundary parameter found! [report this error]... Could not send the message. Can somebody help me to solve this?


title: How to do command-line completion with files and folders

text: As a new Linux user, one of the things that's kept me away from the Command Line (CL) is that, for tasks involving files and folders (i.e. everything!), the amount of typing involved makes using the CL inefficient. I myself have a tendency to use detailed file names. For example, if I have a book called "Elementary Differential Equations and Boundary Value Problems", which is in its 9th edition and is written by William Boyce and Richard DiPrima, then I'll name it like: `elementary_differentail_equations_and_boundary_value_problems_9ed_boyce_diprima.pdf`. So in my effort for learning to use the CL I've look around for ways to overcome this problem and found about _Command-line completion_ with the `Tab` key. The thing with this is that it does word completion but only for commands, not for files and folders. I would like to know if there is a similar feature that works for files?


title: My SMDK2416 (for s3c2416) kernel works on 64MRAM but crashed on 128M

text: I'm currently working on embedded arm linux with smdk2416(s3c2416) The kernel is working on the 64MRAM. Recently, I need to increase the RAM from 64M to 128MB with 64MB on bank0 and 64MB on bank1.               bank0's physical address is at 0x30000000       bank1's physical address is at 0x38000000        I have successfully mapped bank0 from 0x30000000 to 0xc0000000, and bank1 from 0x38000000 to 0xc4000000 in U-Boot. I have tried a memory test on these addresses (both banks' physical and virtual addr) under U-Boot. When I'm booting the linux kernel with bootarg memory tag `mem=128M`, and run a simple program which use memory beyond 64MB. Then the system crashed with the "kernel NULL pointer dereference" message. I found there is a `CONFIG_DISCONTIGMEM` defined in `src/include/asm- arm/memory.h`, but when I look into "Kernel Features/Memory model" in `make menuconfig`, there is only "Flat Memory" option. How and where should I modify the config/code to make the Linux kernel works on the full 128MB?


title: In Vim, how can I automatically determine whether to use spaces or tabs for indentation?

text: Sometimes I edit others source code where the prevailing style is to use tabs. In this case, I want to keep the existing convention of using literal tabs. For files I create myself, and files that use spaces as the prevailing indent style, I wish to use that instead. How can I do this in vim?


If a file tells the OS its file format, how does the OS choose which application to open it by default? In Windows, is the association stored in the registry table? How does Linux choose which application to open a file? I used to use Nautilus a lot, but now I change to terminal. Is it true that in terminal, we always have to explicitly specify which application to open a file? Does the settings of which application to open a file of a certain format by default belong to the file manager (e.g. Nautilus), and it is not an issue when we are living in terminals?


title: Common subroutines in RPM

text: I have some common code that I would like to execute in the **%pre** and **%post** section of my **rpm** spec file. When I place a subroutine in the **%pre** section, I need to add the same subroutine to the **%post** section of the RPM. It sucks maintaining the same subroutine twice. Here is an example: **RPM** spec file **%pre** and **%post** sections:               %pre     log_file=/var/log/myrpminstall.log     #-------------------------------------     # Send text log_file     #-------------------------------------     log_it() {       log_msg=$1       echo -e $log_msg >> $log_file     }          log_it "pre section log information"          %post          log_it "Post section log informations"      Currently, when the **%post** section of the **rpm** executes during an install, I receive an error message:               /var/tmp/rpm-tmp.36557: line 5: log_it: command not found      So, is there a way to make a subroutine like **log_it** accessible to all sections (global function) of the **RPM**?? Currently, I have to place the **log_it** function in the **%post** section if I want to use it there.


title: how to disable auto login in linux mint

text: I'm using linux mint with Cinnamon. The login screen comes to type a username but it also displays that in 10 seconds userx will be automatically logged in. And it happens. How to make it wait indefinitely?


title: wget images with certain path

text: im looking to only grab images from a document with a certain path for example domain.com/uploads/287167/file_name.jpg only grab those with the uploads/number/filename im currently doing it this way               wget http://domain.com/news/36843 -q -O - | sed -n -e"s%^.*\(http://site.com/uploads/[0-9][^ \"\']*\.jpg\).*$%\1%p" | xargs wget -q      any other ways of doing this? thanks in advance


title: OpenBSD performance tuning (desktop)

text: What are your ways of tuning a freshly installed OpenBSD operating system specifically for a desktop environment (faster UI interaction etc.)? What are the most important factors here to consider?


title: Parsing a text-file table and aggregating information

text: I have long text file with the following columns, space-delimited:               Id            Pos Ref  Var  Cn   SF:R1   SR  He  Ho NC            cm|371443199  22  G     A    R   Pass:8   0   1  0  0            cm|371443199  25  C     A    M   Pass:13  0   0  1  0     cm|371443199  22  G     A    R   Pass:8   0   1  0  0             cm|367079424  17  C     G    S   Pass:19  0   0  1  0           cm|371443198  17  G     A    R   Pass:18  0   1  0  0            cm|367079424  17  G     A    R   Pass:18  0   0  1  0       I want to generate a table that lists each unique ID along with counts for:   * How many times that ID occurred   * How many of those rows were passing (column 6)   * How many had an `He` value (column 8)   * How many had an `Ho` value (column 9) In this case:               Id            CountId  Countpass   CountHe CountHO     cm|371443199   3        3          2        1     cm|367079424   2        2          0        2      How can I go about generating that table?


title: SIGKILLing after a grace period

text: I've seen a lot of process managers that try to do this. It was my understanding that you should only use SIGTERM to kill a process. The process could take an unknown amount of time to clean up after itself; on a slow system, it could take minutes. I always thought the only solution was to be patient, and wait for the program to clean up and exit gracefully. If the process does not catch SIGTERMs, then this is a bug and should be reported to the software's maintainer. I've seen popular tools like docker also trying to do this: > Usage: docker stop [OPTIONS] CONTAINER [CONTAINER...] > > Stop a running container (Send SIGTERM, and then SIGKILL after grace period) Is this bad practice? One thing I'm also curious about is how the shutdown procedure works on a SystemV-style init system. I've had a look at some manpages and some other questions but can't find a definite answer. I'm guessing each init service (terminology?) sees the change in run-level and executes the proper "stop" function as defined in the init script. Does it do this one-by-one, making sure each service ends properly? What happens to processes not handled by init scripts? I've seen some questions vaguely mention a grace period being used before SIGKILLing them, but I was hoping someone could elaborate or at least point me in the right direction. :) If someone could help me find out more about how this works with systemd too, I'd be happy to research and find out more. I've had a look at the manpages but can't find anything definitive here either.


title: Why do so many programs live in PATH?

text: One thing that puzzles me about desktop Linux, at least, is that just about everything is in my PATH. By everything, I mean every desktop application, including things like gnome-character-map and glchess. These have no command line interfaces to speak of, so I can't think of a case where I would be regularly launching these from a terminal - and, within that unlikely case, I can't imagine being inconvenienced by needing to type their full paths. It just seems cluttery, but maybe there's a good reason. So, why _does_ this happen? Is there any noteworthy impact on performance or maintainability?


title: Why is a service being started if it isn't mentioned in /etc/init.d?

text: After a clean install of Fedora 17 and `distcc-server`, I did a `service distccd start`, which completed successfully. `man service` indicates that it would merely be running the `distccd` script at `/etc/init.d/distccd`, but that file doesn't exist. `chkconfig` also doesn't appear to know about `distccd`, which is confirmed by there being no related files in `/etc/rc[0-6].d`. There _does_ exist a file `/etc/sysconfig/distccd` that contains run options for the distcc daemon, but I can't seem to find anything linking `service` to `/etc/sysconfig` anyway. How does `service` know what to do when I type `service distccd start`? Also, I have learned that Fedora 17 may redirect `service` to `systemd`/`systemctl`. Even if that is the case, I still don't find any `distccd` related files in `/etc/systemd/{system,user}`.


title: How can I make unicode symbols and truetype fonts work in xterm/uxterm?

text: I'd like to use a truetype font in xterm/uxterm (version 278) but I get problems with unicode symbols (é for example displays fine, so I guess it's not a disabled utf8 or a locale issue):               $ echo -e "\xE2\x98\xA0"      gives me a square instead of ☠ with following config:               UXTerm*faceName: Liberation Mono     UXTerm*faceSize: 9     XTerm*faceName: Liberation Mono     XTerm*faceSize: 9      When I disable truetype fonts using the ctrl right click menu, the symbol displays fine using the default fonts which isn't nice at all. I tried uxrvt and got the same problem when I don't have enough letter spacing, but it works fine when I increase it. However, uxrvt gave me a lot of other problems, just like all the other terminal emulators I tried. Does anybody have an idea?


title: Running a program without the assistance of the system administrator

text: I have an `rpm` for a program called KDirStat that I would like to run on a machine where I am not the system administrator. My questions are:   * Can I **install** this **rpm** package without the assistance of the system administrator? (I mean in a technical sense, aside from whether or not it's good practice)   * If I just want to **run** the program, do I necessarily need to **install** the **rpm** package? More generally, why can I not just download the binaries for my platform and execute the program? As a reference, when I run               rpm -i kdirstat-2.2.0-1.src.rpm      I get the following error:               error: cannot write to %sourcedir /usr/src/redhat/SOURCES      but does that necessarily mean that I **need** the assistance of the system administrator to install this preogram?


title: How do I find the process generating a lot of network traffic?

text: My machine is generating a lot of network traffic, all from the same source port, with many different destinations (found this out by running `iftop -P`, and from my router's logs). How do I find the process that is generating this traffic?


title: Trying to run Virtualbox under NX session: getting permission denied

text: I am running Nomachine NX server on my Ubuntu 12.04, and I'm connecting from a Windows 7 machine using NX client. When I try to start VirtualBox, I get a permission denied error. The same user that I use to connect to NX session can obviously run VirtualBox just fine. How do I fix this?


title: Reformatting a LaTeX document by perl

text: I have a `LaTeX` document in which the modifications in the text and equations are done in red color in order for them to be distinguished from unmodified text:               {\color{red} MODIFIED TEXT OR EQUATION GOES HERE.}      This modification can be a single word, a phrase, a sentence, a paragraph, or an equation. For example:                \pi \rho \hat{\bf x} \int\omega_{\color{red} \theta}      or               {\color{red} This work presents the ``numerical study'' of convection in vertical annuli;}      How can I write a `perl` one-liner which can replace `{\color{red} MODIFIED TEXT OR EQUATION GOES HERE.}` to `MODIFIED TEXT OR EQUATION GOES HERE.`? I mean to remove `{\color{red}` and the right curly brace `}` throughout the entire `LaTeX` document.


title: How to boot Linux to command-line mode instead of GUI?

text: I am using 32-bit Red Hat Linux in my VM. I want to boot it to command-line mode, not to GUI mode. I know that from there I can switch to GUI mode using `startx` command. How do I switch back to command-line mode?


title: CUPS timeout for change status to error

text: I recently installed CUPS 1.5.3 on my Debian Squeeze server. I don't think it's relevant but I think the latest version is 1.6.3, right? However, I'm installing with aptitude, so I'm getting this apparently older version. So my problem is:   * I configure 1 LPD printer   * I sent a job with printer door/cover opened, so is not printed right? But the job stays in the queue with **Spooling job, 0% complete** for infinite minutes. So, I want to limit this time, for **cups alter status to error (or any other)** , because, if I can change it, and limit the timeout, maybe with some script, I can redirect this job to another printer. How can I do that?


title: Typing break with Awesome WM

text: Is there a program that implements typing breaks that works with the Awesome Window Manager?


title: Why is it that these two 'cat' commands result differently?

text: Let's assume that infile contains a specific text, and I were to execute the following set of commands: > exec `3<infile` > > cat -n `<&3` > > cat -n `<&3` The first instance of cat will display the file's contents, but the second time does not seem to be doing anything. Why do they differ?


title: A triangle of forward differences in gawk

text: I need a `gawk` script (not a one-liner, I need a function). Given a row of integers i.e.               0 2 4 1 9 5 1 1      the function should generate successive forward absolute differences, so:               0 2 4 1 9 5 1 1      2 2 3 8 4 4 0       0 1 5 4 0 4        1 4 1 4 4         3 3 3 0          0 0 3           0 3            3      How can I do that using `gawk`?


title: boot fail after install f19

text: When I installed f19, I saw this message "system cannot install boot loader" I enter these commends:               chroot  /mnt/sysimage,     grub2-install /dev/sda  --force,     grub2-mkconfig -o /boot/grub2/grub.cfg      when system reboot system gives this message               minimal base-like line editing is supported. for the first word tab lists     possible command completions. anywhere els TAB lists possible device or      file  completions.      GRUB>


title: sftp a file using shell script

text: I have read through several threads (which have been helpful) and I'm still getting an error when trying to sftp a file (client wants it to be sftp'ed) Here is the script:               #!/bin/bash      HOST=XX.XX.XX.XX     PORT=XXXX     USER=root     FILE=/tmp/RANDY          /usr/bin/expect<<EOD          spawn sftp -o Port=$PORT $USER@$HOST     expect "sftp>"     spawn put $FILE     interact     EOD      The error I am receiving is:               spawn sftp -oPort=XXXX root@XX.XX.XX.XX     Connecting to XX.XX.XX.XX...     sftp> spawn put /tmp/RANDY     couldn't execute "put": no such file or directory         while executing     "spawn put /tmp/RANDY"      The file exists and is in the correct directory.


title: "Who" prints duplicated usernames

text: This is result of `who -uH`:               NAME     LINE         TIME             IDLE          PID COMMENT     me    :0           2013-08-29 01:29   ?          1686 (:0)     me    pts/0        2013-08-29 01:42  old         2905 (:0)     me    pts/1        2013-08-29 01:45  old         2905 (:0)     me    pts/2        2013-08-29 01:52  old         2905 (:0)     me    pts/3        2013-08-29 02:26  old         2905 (:0)     me    pts/4        2013-08-30 18:37 00:07        2905 (:0)     me    pts/5        2013-08-29 10:34  old         2905 (:0)     me    pts/6        2013-08-29 11:05  old         2905 (:0)     me    pts/7        2013-08-29 13:34  old         2905 (:0)     me    pts/8        2013-08-30 15:56 02:45        2905 (:0)     me    pts/9        2013-08-30 18:27 00:17        2905 (:0)     me    pts/10       2013-08-30 17:34   .          2905 (:0)     me    pts/11       2013-08-30 17:37 00:13        2905 (:0)     me    pts/12       2013-08-30 18:28 00:17        2905 (:0)     me    pts/13       2013-08-30 18:38 00:07        2905 (:0)      Why it lists my username in 15 lines? How do I know If someone has connected to my system remotely?


title: Disable hardware ad-hoc

text: I am running Parted Magic doing some data recovery, that I am finding myself concurrently using for some other minor tasks also. Problem being, typing is a nightmare, as the trackpad is enabled (No hardware way of disabling it), and seemingly very sensitive. Just wondering:   1. Generally is there is any way to disable hardware in Linux, without restarting X, or the machine (i.e., Ad hoc)?   2. Are their any options to address this specific problem, if not by disabling the device, perhaps redirecting it's output


title: wireless networking

text: When I connect my laptop to a **wpa2** secured router, using **wicd** I don't have any connection problems. **BUT** when I connect with the following command-line command ( as outlined here ) **UPDATED:**               ifconfig wlan0 up     wpa_supplicant -B -Dwext -i wlan0 -c /etc/wpa_supplicant.conf     dhcpd wlan0      My connection is unstable, sometimes working sometimes not, indicated by the following output:               $ ping google.com     PING google.com (64.233.179.104) 56(84) bytes of data.     64 bytes from cpt01s01-in-f104.1e100.net (64.233.179.104): icmp_seq=1 ttl=56 time=190 ms     64 bytes from cpt01s01-in-f104.1e100.net (64.233.179.104): icmp_seq=2 ttl=56 time=196 ms     64 bytes from cpt01s01-in-f104.1e100.net (64.233.179.104): icmp_seq=3 ttl=56 time=184 ms     64 bytes from cpt01s01-in-f104.1e100.net (64.233.179.104): icmp_seq=4 ttl=56 time=172 ms     64 bytes from 64.233.179.104: icmp_seq=5 ttl=56 time=196 ms     ping: sendmsg: Network is unreachable     64 bytes from cpt01s01-in-f104.1e100.net (64.233.179.104): icmp_seq=7 ttl=56 time=210 ms     64 bytes from cpt01s01-in-f104.1e100.net (64.233.179.104): icmp_seq=8 ttl=56 time=181 ms     64 bytes from cpt01s01-in-f104.1e100.net (64.233.179.104): icmp_seq=9 ttl=56 time=168 ms     64 bytes from cpt01s01-in-f104.1e100.net (64.233.179.104): icmp_seq=10 ttl=56 time=168 ms     64 bytes from cpt01s01-in-f104.1e100.net (64.233.179.104): icmp_seq=11 ttl=56 time=171 ms     ping: sendmsg: Network is unreachable     ping: sendmsg: Network is unreachable     ping: sendmsg: Network is unreachable     ping: sendmsg: Network is unreachable     ping: sendmsg: Network is unreachable     ping: sendmsg: Network is unreachable     64 bytes from cpt01s01-in-f104.1e100.net (64.233.179.104): icmp_seq=18 ttl=56 time=171 ms     64 bytes from cpt01s01-in-f104.1e100.net (64.233.179.104): icmp_seq=19 ttl=56 time=164 ms     64 bytes from cpt01s01-in-f104.1e100.net (64.233.179.104): icmp_seq=20 ttl=56 time=181 ms     64 bytes from cpt01s01-in-f104.1e100.net (64.233.179.104): icmp_seq=21 ttl=56 time=187 ms      64 bytes from cpt01s01-in-f104.1e100.net (64.233.179.104): icmp_seq=22 ttl=56 time=192 ms     ping: sendmsg: Network is unreachable     ping: sendmsg: Network is unreachable     ping: sendmsg: Network is unreachable     ^C     --- google.com ping statistics ---     25 packets transmitted, 15 received, 40% packet loss, time 28231ms     rtt min/avg/max/mdev = 164.443/182.621/210.508/12.774 ms      My `/etc/wpa_supplicant.conf` file:               network={         ssid="1010011010"         #psk="------------"         psk=------------------------------------------     }      `dhcpcd wlan0`               $ sudo dhcpcd wlan0      dhcpcd[18320]: version 5.2.5 starting     dhcpcd[18320]: wlan0: rebinding lease of 192.168.123.102     dhcpcd[18320]: wlan0: acknowledged 192.168.123.102 from 192.168.123.254     dhcpcd[18320]: wlan0: checking for 192.168.123.102     dhcpcd[18320]: wlan0: carrier lost     dhcpcd[18320]: wlan0: carrier acquired     dhcpcd[18320]: wlan0: rebinding lease of 192.168.123.102     dhcpcd[18320]: wlan0: acknowledged 192.168.123.102 from 192.168.123.254     dhcpcd[18320]: wlan0: checking for 192.168.123.102     dhcpcd[18320]: wlan0: leased 192.168.123.102 for 86400 seconds     dhcpcd: wlan0: MTU set to 1500     dhcpcd[18320]: forked to background, child pid 18377      `ifconfig`               $ ifconfig     lo        Link encap:Local Loopback                 inet addr:127.0.0.1  Mask:255.0.0.0               inet6 addr: ::1/128 Scope:Host               UP LOOPBACK RUNNING  MTU:16436  Metric:1               RX packets:0 errors:0 dropped:0 overruns:0 frame:0               TX packets:0 errors:0 dropped:0 overruns:0 carrier:0               collisions:0 txqueuelen:0                RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)          wlan0     Link encap:Ethernet  HWaddr 00:15:AF:78:D4:AA                 inet6 addr: fe80::215:afff:fe78:d4aa/64 Scope:Link               UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1               RX packets:3218 errors:0 dropped:0 overruns:0 frame:0               TX packets:2909 errors:0 dropped:0 overruns:0 carrier:0               collisions:0 txqueuelen:1000                RX bytes:1959355 (1.8 Mb)  TX bytes:415438 (405.7 Kb)      `route`               $ route          Kernel IP routing table     Destination     Gateway         Genmask         Flags Metric Ref    Use Iface     192.168.123.0   *               255.255.255.0   U     303    0        0 wlan0     default         192.168.123.254 0.0.0.0         UG    303    0        0 wlan0


title: Is there a way to add a directory to my PATH in zsh only if it's not already present?

text: Is there an easy way in zsh to add a directory to my PATH only if it's not already present? (or, more generally, any environment variable). I've tried:               PATH+=/my/directory      ... but if that's executed twice, it gets added twice.


title: Help me parse this `find` command

text: Following command tells me the length of mp4 video files:               find -type f -name "*.mp4" -print0 | \        xargs -0  mplayer -vo dummy -ao dummy -identify 2>/dev/null | \        perl -nle '/ID_LENGTH=([0-9\.]+)/ && ($t +=$1) && printf "%02d:%02d:%02d\n",$t/3600,$t/60%60,$t%60' | \        tail -n 1      Can someone parse it to a Linux beginner and explain why it is the way it is? It would also be helpful to know how to use it again and again without retyping it or through copy-and-paste.


title: What is the loopback interface

text: What is the **loopback** interface and how does it differ from the **eth0** interface? And why do I need to use it when _mounting an ISO_ or running a service on localhost?


title: What do double slashes mean in UNIX path? Is `cd dir/subdir//` valid?

text: > **Possible Duplicate:**   >  How linux handles multiple path separators (/home////username///file) Do `cd dir/subdir/` and `cd dir/subdir//` mean the same in UNIX? Will the later work out? Else does it have any special meaning? cd, mv, ls or any command for that sake.


title: When should I use a trailing slash on a directory?

text: > **Possible Duplicate:**   >  How linux handles multiple path separators (/home////username///file) Most commands I use in linux behave exactly the same whether I include the trailing slash `/` character on the end of a directory name or not. For example:               ls /home/cklein     ls /home/cklein/          cp foo bar     cp foo/ bar/      When does this trailing slash matter? What is the semantic meaning of the trailing slash?


title: What's the difference between "command directory" and "command directory/"?

text: > **Possible Duplicate:**   >  When should I use a trailing slash on a directory? Does the slash make any difference?


title: How can I find the valid values for TERM to use in tmux?

text: When starting `tmux` I need to pass a valid terminal type. Since I am scripting the initial startup of `tmux` I would like to cover all bases by figuring out the valid values of `TERM` on the current system. How do I find valid values to use for `tmux` and which order, including a possible 16 color fallback, should I prefer? This is mainly for Linux systems, but I presume the approach would be similar on most other unixoids.


title: Can disks be accessed independently in a RAID-1 volume?

text: I want to create a RAID-1 array with Debian 6. This array will contain 6 disks, 3 for the OS and 3 mirrors. I used this RAID before but on windows, and maybe I didn't do it good at all, because I could see 3 different disks, but only one for the OS. Is there a way that the OS will see the 3 disks like one ? or they will be like different units?


title: How can I find files and then use xargs to move them?

text: I want to find some files and then move them. I can find the file with:               $ find /tmp/ -ctime -1 -name x*      I tried to move them to my `~/play` directory with:               $ find /tmp/ -ctime -1 -name x* | xargs mv ~/play/      but that didn't work. Obviously mv needs two arguments.   Not sure if (or how) to reference the xargs 'current item' in the mv command?


title: Check if 2 directories are hosted on the same partition on Linux

text: How can I check if `/my/dir` is on the same partition as `/`? This is for integration within a script. Bind mounts should be handled correctly. POSIX compatible solutions are welcome.


title: clear command in Konsole

text: I know about the Linux `clear` command, but it just moves the previous output from the visible part of terminal window (KDE Konsole). I can still scroll up and see all previous text. Is there similar command that can erase entire content of a terminal window? (Something like clc in matlab.)


title: Remmina doesn't work with keyboard when connected remotely

text: In order to bypass firewall/GPO constraint, I want to use Ubuntu as springboard to rdp to a Windows box on the same LAN remotely. I can `xrdp` to ubuntu via sesman-Xvnc module. I can run `remmina` from the `vnc` session. But in the `remmina` Windows session, keyboard doesn't work at all. Only mouse works. Keyboard works with other apps in `vnc` session. Also, if I use remmina at local Ubuntu console, keyboard works. Any suggestions?


title: Dereference copy with KDE Dolphin

text: From the cli I can dereference copy a symbolic link with `cp -L`. Is it possible to do this with the KDE Dolphin file manager?


title: Number of files per directory

text: I have a directory with about 100000 small files (each file is from 1-3 lines, each file is a text file). In size the directory isn't very big (< 2GB). This data lives in a professionally administered NFS server. The server runs Linux. I think the filesystem is ext3, but I don't know for sure. Also, I don't have root access to the server. These files are the output of a large scale scientific experiment, over which I don't have control. However, I have to analyze the results. Any I/O operation/processing in this directory is very, very slow. Opening a file (fopen in python), reading from an open file, closing a file, are all very slow. In bash ls, du, etc. don't work. The question is: What is the maximum number of files in a directory in Linux in such a way that it is practical to do processing, fopen, read, etc? I understand that the answer depends on many things: fs type, kernel version, server version, hardware, etc. I just want a rule of thumb, if possible.


title: Are there any animation programs for animating static images?

text: I'd like to make a simple movie with my kids. I've taken some pictures of toys and cropped them to be the characters. I'd like to make a movie where these move against some background (ie the characters _themselves_ are not animated but move "as a whole"). Finding such a program seems beyond my search capabilities. Does anyone know of a good program for doing this, preferably one that is simple enough that my (young) kids can follow along with what I'm doing (I wouldn't go so far as to expect them to be able to do it, but it needs to be close enough that they won't get bored; so `blender` is probably not suitable).


title: Centos: Adduser/Passwd/Sudoer Script

text: I'm currently running a VPS on CentOS. I have an application running in the background and it will run a script under `sudo` to either disable or enable any account. So what I'm trying to create is a script that creates an account, adds a password and adds the users under "etc/sudoers". The script is being run as root so there shouldn't be any permission errors. How would I come to create this script?


title: Debian update fails with "Raid version incompatible"

text: While installing proftpd, it dropped with following error:               [....] Starting ftp server: proftpdhexadecacordis proftpd[26849]: mod_tls_memcache/0.1: notice: unable to register 'memcache' SSL session cache: Memcache support not enabled     . ok      Setting up proftpd-mod-vroot (0.9.2-2+b2) ...     Errors were encountered while processing:      linux-image-3.2.0-4-amd64     E: Sub-process /usr/bin/dpkg returned an error code (1)      I first did not notice `linux-image-3.2.0-4-amd64` error, so I tried to set up libmemcache, and it dropped with same error. So, I ran an upgrade, and everything updated, except following. So I ran it again, to display clear view of error:               # apt-get upgrade     Reading package lists... Done     Building dependency tree            Reading state information... Done     The following packages have been kept back:       xserver-xorg-input-all     0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.     1 not fully installed or removed.     After this operation, 0 B of additional disk space will be used.     Do you want to continue [Y/n]? y     Setting up linux-image-3.2.0-4-amd64 (3.2.46-1+deb7u1) ...     Running depmod.     Examining /etc/kernel/postinst.d.     run-parts: executing /etc/kernel/postinst.d/initramfs-tools 3.2.0-4-amd64 /boot/vmlinuz-3.2.0-4-amd64     update-initramfs: Generating /boot/initrd.img-3.2.0-4-amd64     run-parts: executing /etc/kernel/postinst.d/pm-utils 3.2.0-4-amd64 /boot/vmlinuz-3.2.0-4-amd64     run-parts: executing /etc/kernel/postinst.d/zz-runlilo 3.2.0-4-amd64 /boot/vmlinuz-3.2.0-4-amd64     Warning: LBA32 addressing assumed     Fatal: Incompatible Raid version information on /dev/md0   (RV=0.90 GAI=1.2)     run-parts: /etc/kernel/postinst.d/zz-runlilo exited with return code 1     Failed to process /etc/kernel/postinst.d at /var/lib/dpkg/info/linux-image-3.2.0-4-amd64.postinst line 696.     dpkg: error processing linux-image-3.2.0-4-amd64 (--configure):      subprocess installed post-installation script returned error exit status 1     Errors were encountered while processing:      linux-image-3.2.0-4-amd64     E: Sub-process /usr/bin/dpkg returned an error code (1)      I can't find any solution connected with "Incompatible Raid version information". I'm newbie in debian server administration, so please, explain me in basic english how to solve this problem.


title: xterm cygwin setting vtfonts -> truetype fonts, utf8-encoding, utf8-fonts set by default

text: I'm using cygwin and cygwin X server, I'm having a problem with xterm. Every time I start it I have to set its parameters via the menu. Is there a way to make them set to true by default? I found a file named `/etc/X11/app-defaults/XTerm` which I believe should be used to put default settings to XTerm, but I can't find correct parameters names and values.


title: Remapping both Caps Lock and Shift+Caps Lock in xkb

text: I am trying to configure xkb such that Caps Lock is mapped to the Compose key and Shift+Caps Lock functions as the traditional Caps Lock. I put the following in a new file called `/usr/share/X11/xkb/symbols/gdwatson`:               partial modifier keys     xkb_symbols "compose" {         key <CAPS> {             type[Group1] = "TWO_LEVEL",             symbols[Group1] = [ Multi_key, Caps_Lock ]         };     };      Then I ran `setxkbmap -symbols 'pc+us+gdwatson(compose)'`, which completed successfully. Caps Lock works as Compose, but Shift+Caps Lock works as Compose instead of Caps Lock. `xkbcomp :0.0` reveals the following:               key <CAPS> {         type= "TWO_LEVEL",         symbols[Group1]= [       Multi_key,       Multi_key ]     };      The second level symbol mapping is duplicating the first for some reason, rather than the separate value I tried to give it. Does anyone have strong enough xkb-fu to tell me what I've done wrong or how to fix it?


title: Generic notification framework/API

text: I'm looking for a specific functionality/piece of software, and I'm wondering if anyone can help me find it. I administer a fairly large number of servers and run some long-term jobs on some of them (system ones, php, bash, perl scripts, etc) I'm looking for something like a cross between libnotify (in that it uses DBUS/programmes hook into it and there's a notification daemon), and google's re-imagined unified notification system. Ideally it wouldn't require re-writing everything and would intercept notifications (even on headless servers) and then handle them per a user's configuration options. These would probably be sent to some centralised location and dispatched to email/chat/text message/libnotify popup. Bonus points if it handles the case for   * If I'm listed as "available" on a certain computer, it'll send notifications there, and email   * Otherwise it will failover down a list of `write`ing to my logged in terminals on that computer (like broadcast shutdown messages), IMing me, text mesasging me.   * All will send an email just in case.


title: Emulate unplugging a network cable with qemu-kvm

text: _[Background: I'd like to actually testHow to take down a static network interface when not connected? ]_ I'm setting up a QEMU-KVM virtual machine using libvirt (via `virt-manager`). I put two NICs on it (both virtio). They are bridged to a physical NIC on the host. I want to test what NetworkManager does when I "unplug" one. But there isn't button/checkbox for that in virt-manager, nor a quick Google search turn up anything. How do I emulate unplugging the network cable?


title: Auto mount USB devices on debian?

text: This isn't a big deal i was just curious so if anyone happens to know why then great. I'm not sure if usbmount is the tool as which usbmount doesn't show anything but on my debian system (no graphics) when i plugin my usb and load it in vmware i see               [sdb] Assuming drive cache: write through      I don't see it in `/media` nor `/mnt`. Using the same install CD i can install the graphic version and when i plug in the usb the same way it shows up in `/media`. Does anyone know why? I figured either nothing would happen or it would show up when i plugged it in. Now i get the msg so its like something in between.


title: Linux on Hard Drive Partition, Bootloader on USB Flash Drive

text: How can I use a USB flash drive to boot Linux from a partition on (another) hard drive? I'm trying to install Linux on an encrypted partition on the hard drive (using LVM on LUKS). Since `/boot` must be on a separate, unencrypted partition, I would like to store it on a USB flash drive. My plan was to install GRUB (2) to the flash drive (`/dev/sdb`) and boot Linux from it's MBR, or if the drive was unplugged simply boot Windows from the hard drive's (`/dev/sda`) MBR. * * * I installed GRUB (2) to `/dev/sdb`, but when I tried to boot from the flash drive I got the following message: > Grub Loading After a couple of seconds I got an additional message: > Read Error For testing purposes, I tried to delete the contents of `/boot`, and I got the same message after booting again from the flash drive. * * * **PARTITIONING DETAILS** `/dev/sda` (Hard Drive):               MBR: Windows Bootloader     /dev/sda1 - Windows System Partition     /dev/sda2 - Windows Boot Partition     /dev/sda3 - Windows Data Partition     /dev/sda4 - Linux partition      `/dev/sdb` (USB Flash Drive):               MBR: GRUB     /dev/sdb1 - Linux /boot Partition      * * * **GRUB DETAILS** `/etc/default/grub`:               GRUB_CMDLINE_LINUX="cryptdevice=/dev/disk/by-uuid/$SDA4_UUID:vg root=/dev/mapper/vg-root resume=/dev/mapper/vg-swap cryptkey=/dev/disk/by-uuid/$SDB1_UUID:ext2:/key"     ..     GRUB_DISABLE_LINUX_UUID=true      **Installation command**               grub-install --target=i386-pc --recheck /dev/sdb      I'm using Arch Linux.


title: command line tool to set time zone

text: In Centos 5.x there is the text mode interface of system-config-date to set the time zone. Although that utility still exists in Centos 6 the text mode is gone. Is there anything similar in Centos 6?


title: What is the recommended way of start and supervise daemons on Arch Linux?

text: > **Possible Duplicate:**   >  Ensure a process is always running At the moment I use a quick and dirty `nohup ... &` to start application and database servers. E.g.               su - foo -c "nohup php-cgi -b 8888 &"      This approach has obvious disadvantages of not starting my service at boot, not restarting the service and/or notifying me if it crashes, not automatically starting dependent daemons, having to `ps` to look for PID to kill etc. I found `upstart` but it seems to break the `rc.d` so I have to reconfigure all system-wide daemons such as `sshd`, `syslog-ng` etc to use it. Is there a non-intrusive alternative to `upstart` that works well with arch linux, coexists with existing `rc.d` scripts, supports running daemons under specific users and respawns them if they die? A support for dependencies and notifications on a respawn is a plus but is not required. Of course I can write a rather simple shell script myself and plug it into `rc.d`, but are there any de facto standard well-tested solutions besides `rc.d` which doesn't provide respawning? UPD: I found `monit`. Is it any good, and are there any better solutions?


title: Building a process Watchdog

text: I intend to write a process watchdog that runs out of cron or similar that watches all of the core processes denoting things like run state, VMstat, Inet operations and reports it to a file or external host. If a process dies that is deemed core it restarts it. Is an already written watchdog existent that can address my needs?


title: Can I limit a user (and their apps) to one network interface?

text: As the title really. I've actually got two scenarios to apply this:   1. Multiseat Desktop: two network connections both with internet gateways and two accounts doing bandwidth-intensive tasks on each. I want to split them up so one account only uses eth0 and the second account only uses eth1.   2. Server: I have two IPs on a server and I want to make sure the mail user only sends email from the second IP (eth0:1 alias) The second can probably be IPTabled (I just don't know how) to route email traffic through that interface but the first will be dealing with all sorts of traffic so needs to be user-based. If there is a user-based solution, I could apply this in both places.


title: How to record my full screen with audio?

text: If I want to record my desktop, I use:               ffmpeg -f x11grab -s `xdpyinfo | grep -i dimensions: | sed 's/[^0-9]*pixels.*(.*).*//' | sed 's/[^0-9x]*//'` -r 25 -i :0.0 -sameq valami.avi      But it doesn't save any audio -- how can I include sound with the video? Extra: How can I set on-the-fly encoding like with x264 + mp3:128kbit?


title: **/ not working with a mounted volume

text: I'm trying to recursively extract a set of .jpgs from a mounted volume using SMB1, to a folder on my computer. Here's what I've got:               cp -a **/97*.jpg /Users/.../All_Covers      This works as long as my current directory, and the images, are somewhere on my computer, but as soon as I `cd` to the mounted volume where the directories holding the actual images are, it fails, giving me a:               cp: **/97*.jpg: No such file or directory      Why is this failing? Is there a workaround?


title: How to search all subdirectories and their subdirectories for the occurence of a word using grep?

text: > **Possible Duplicate:**   >  Searching for string in files Suppose I have a directory called Home and it is my current directory. And in this home directory I have many other directories directory1, directory2, etc. How do I do a grep to find the occurrence of a word (say "AXN") in any of the files in all of these subdirectories (and their subdirectories?)


title: How use minimum number of commands to copy all .txt files from all subdirectories to one directory?

text: I have more than 90 subdirectories and inside each one, there will be a number of .txt files. What I need to do is to copy all those txt files out to one single directory. How can I do that?


title: Apache configuration with proxy and location

text: I want to map these domains to these ports. How can I do it?               http://test1.example.com/phpmyadmin/    example.com:80/phpmyadmin/     http://test1.example.com/app1/          example.com:8080/app1/     http://test1.example.com/app2/          example.com:8090/app2/          http://webmin.example.com/              example.com:10000/      This is what I did. The problem is, `phpmyadmin` is not working. It is forwarded to `glassfish`. `webmin` is working because it is a seperate domain. How can I map `phpmyadmin` to the same domain? http://test1.example.com/phpmyadmin/               <VirtualHost *:80>         ServerName              test1.example.com         ProxyRequests           Off         ProxyPreserveHost       On              <Proxy *>           Order deny,allow           Allow from all         </Proxy>              ProxyPass           /           http://localhost:8080/         ProxyPassReverse    /           http://localhost:8080/              ProxyPass           /admin/     https://localhost:4848/         ProxyPassReverse    /admin/     https://localhost:4848/     </VirtualHost>          <VirtualHost *:80>         ServerName      test1.example.com/phpmyadmin/         DocumentRoot    /usr/share/phpmyadmin              Alias           /phpmyadmin     /usr/share/phpmyadmin         Alias           /mysql          /usr/share/phpmyadmin     </VirtualHost>          <VirtualHost *:80>         ServerName              webmin.example.com         ProxyRequests           Off         ProxyPreserveHost       On              <Proxy *>           Order deny,allow           Allow from all         </Proxy>              ProxyPass           /               http://localhost:10000/         ProxyPassReverse    /               http://localhost:10000/     </VirtualHost>


title: Is there a xterm equivalent that is optimized for use over VNC?

text: **tl;dr** Is there a terminal emulator that uses rectangular copies for scrolling? * * * I'm doing a lot over work over the internet just now (hacking a program on my employer's cluster that can't be installed on my laptop), and that has caused some changes in my workflow. Getting a ssh tunnel with X support through the firewall to the cluster is no problem, then I have a choice.   1. **Open a couple of remote xterms and emacs and go to work directly** This is simple, but I lose all my working state anytime I disconnect from the network. Having a hairtrigger `C-x C-s` reflex means that I don't lose any edits, but I have to manage the lifetime of long jobs with `nohup` or `disown`, and there is fair amount of setup to do every time I log back in (even after writing a couple of scripts to cover the invariant parts of the setup).   2. **Run vncserver to give myself a persistent desktop** Seems like the perfect solution to the troubles of the direct connection, but over moderate speed connections my plain-ole' xterms seem to take inordinately log to update. Watching them it doesn't seem like they are doing rectangular copies which VNC is good at (indeed it is faster to drag filled in windows around the desktop than frames). So I find myself wondering if things wouldn't be faster on a terminal emulator that uses rectangular copies for scrolling? * * * _Aside:_ X is necessary as the product I'm working on uses it for display.


title: Cannot forward when going through welcome screen for fedora 15

text: I just installed fedora 15 on my laptop, but I have problem get it working. My current situation is that when the installation is done, it reboots and gives me a welcome screen. I setup username as usual, but when it comes to the "date and time" screen, it won't let me proceed any further. I press "forward" button but nothing happens. Does anybody has this same issue? How did you solve that? Thanks.


title: How to enable cups-lpd / port 515?

text: I have a print server using CUPS on a CentOS 5.3 box. On my PC, I set up a remote printer with the URI http://$PRINT_SERVER:631/printers/$PRINTER_NAME, and have successfully been able to print files to it. There is another system, which my team does not have control over, that sends all of its print requests using LPD on port 515. I need to handle this somehow. I installed the cups-lpd package and edited the /etc/xinetd.d/cups- lpd file to enable it (or so I thought):               ~$ cat /etc/xinetd.d/cups-lpd     service printer     {             socket_type = stream             protocol = tcp             port = 515             wait = no             user = lp             group = sys             passenv =             server = /usr/libexec/cups/daemon/cups-lpd             server_args = -o document-format=application/octet-stream             disable = no     }      But as far as the other computers on the network are concerned, port 515 is closed:               Starting Nmap 5.51 ( http://nmap.org ) at 2011-09-02 16:41 Central Daylight Time          Nmap scan report for [IP address]     Host is up (0.028s latency).     Not shown: 995 closed ports     PORT     STATE SERVICE     514/tcp  open  shell     631/tcp  open  ipp     1066/tcp open  fpo-fns     1067/tcp open  instl_boots     6000/tcp open  X11          Nmap done: 1 IP address (1 host up) scanned in 0.52 seconds      Is there something else I need to change in the xinetd configuration to enable the LPD port?


title: editing /etc/init.d/rc.local to run after login tty processes

text: doing a `ps-e`, I see the following on startup:               PID  TTY CMD     ...     1880 ?   my_auto_script     1881 tty1 login     1882 tty2 getty          ...      `my_auto_script` is called from `/etc/rc.local`. I have `/etc/init.d/rc.local` configured as such:               Required-Start: $all     Default-Start: 2 3 4 5      so this should run last. But it doesn't seem able to run after any `tty` processes. This is what I need. How do I make this work?


title: startxwin: command not found

text: I am trying to enable X11 forwarding on my cygwin.. And I was following this tutorial. Whenever I do `startxwin`, I always get this error -               root@ubuntu-dyn-cassandra-50686:~# startxwin     startxwin: command not found      Any thoughts?


title: Intermittent ssh denial

text: The main server in my network (nothing less...) plays tricks with its ssh connectivity. It is a CentOS 6.4/64 (runs as KVM-based virtualization host with a dozen VMs on it). It receives its IP via DHCP with fixed assignment. Its /etc/resolv.conf seems just fine, as well as its network co It would normally work, allowing me to ssh into it and being logged in, I'm able to see the internet, ping external servers etc. **But intermittently, it will deny ssh access.**   * If pinged from the LAN, it is there; also nmap or opening a socket via bash against port 22, it is there.    * Pinged from outside it won't respond. Currently open ssh sessions stay connected (but now they cannot see the internet nor ping me back).    * The VMs on top of it continue working perfectly, no issues there, all have public IPs and use bridges as per KVM best practices...(afaik).   * Not a single trace in the log about what can be going wrong with it.   * I consider the network to be healthy.   * Modified the sysctl.conf to set net.ipv4.tcp_keepalive_time=120 to no avail. Then, all of a sudden, it will come back to life and work as if nothing has happened (but it may take up to 10 may be 20 minutes to reappear... - not good for a critical component...) No iptables in the way (disabled). Any hints about how to troubleshoot this ? (This could be a duplicate of SSH getting disrupted intermittently but conditions look somewhat different).


title: How do I use dhcpcd in openwrt instead of udhcpc?

text: I'm trying to determine the reason my router is not syncing up to my ISP, I do suspect snafu on their end so I'm trying to replicate my desktops setup which includes using dhcpcd. Problem is I don't know how to tell OpenWRT to use that after I've installed it on OpenWRT. Can anyone tell me the steps to install and configure dhcpcd for WAN on OpenWRT? I'm using backfire 10.03 on a WRT54GL.


title: Keep track of all files accessed by a specific process?

text: There has recently been a (publicly unconfirmed) report that Skype is accessing files that it shouldn't be, without user intervention. I have no idea if this is the case with Skype on linux, but it would be good to be able to find out. Is there a way to keep track of all files accessed by a specific process?


title: Trying to understand uboot image copying

text: The following is snippet from `u-boot-xarm/include/configs/zynq_zc702.h`               "qspiboot=echo Copying Linux from QSPI flash to RAM...; \                     cp 0xFC100000 0x8000 ${kernel_size}; \                     cp 0xFC600000 0x1000000 0x8000; \                     echo Copying ramdisk...; \                     cp 0xFC800000 0x800000 ${ramdisk_size};\                     ping 10.10.70.101;\                     go 0x8000\0" \      Can somebody explain what is happening in these two lines:                                   cp 0xFC100000 0x8000 ${kernel_size}; \                         cp 0xFC600000 0x1000000 0x8000; \      How these addresses are chosen? And why so many addresses?


title: Does hexdump respect the endianness of its system?

text: On my machine I get the following output when I run these commands:               $ echo foos > myfile     $ hexdump myfile     6f66 736f 000a      The output from hexdump is little-endian. Does this mean that my machine is little-endian, or does hexdump always use little-endian format?


title: How do I use new fdisk table without reboot (kpartx)?

text: When I run fdisk and change the size of a partition, fdisk says at the end of its output:               The new table will be used at the next reboot or after you run partprobe(8) or kpartx(8)      I'd like to do so without having to reboot (and then write a script that does it) How do I use kpartx to do this correctly? I've tried:               kpartx -f -v /dev/mmcblk0      Which outputs:               mmcblk0p1 : 0 102400 /dev/mmcblk0 2048     mmcblk0p2 : 0 7657472 /dev/mmcblk0 104448      and:               kpartx -a -v /dev/mmcblk0      which outputs:               device-mapper: reload ioctl on mmcblk0p1 failed: Invalid argument     create/reload failed on mmcblk0p1     add map mmcblk0p1 (0:0): 0 102400 linear /dev/mmcblk0 2048     device-mapper: reload ioctl on mmcblk0p2 failed: Invalid argument     create/reload failed on mmcblk0p2     add map mmcblk0p2 (0:0): 0 7657472 linear /dev/mmcblk0 104448      This is for an SD card in a raspi running debian. EDIT: To clarify what I am trying to do; I am deleting an unused p3 from an SD Card and resizing p2 to fill the card. The card currently contains a small boot partition p1 and p2 is where the OS sits.


title: Is there a way for linux to pick up the phone?

text: I know that there is a way to make Linux dial out using a modem. Is there a way to program Linux (using a library/device) to   1. pick up the modem (record phone calls) etc?   2. see caller id?


title: How can I observe memory bandwidth?

text: I have an embedded Linux ARM system that is showing significantly less throughput than expected on both Ethernet and USB. I suspect the memory may be contributing. Is there a way to observe the memory bandwidth that is consumed while running a throughput test on the Ethernet or USB?


title: Recursively find and move corrupted PDFs

text: ### The Issue I was using `python-skydrive` to download files to my PC, and I accidentally corrupted a good amount of my PDF files. When I try to view them in Document Viewer, I get the following error message: > File type plain text document (text/plain) is not supported                $file ny.pdf      $ny.pdf      ### My Request I'm looking for a command line tool or snippet that will allow me to recursively find PDF files in a folder and its subfolders, and then move corrupted files to a designated folder. I'm using Ubuntu 13.10 on an x64 PC.


title: Problems installing Linux Mint

text: I tried to install Linux Mint 15 on my PC using a bootable USB. I had partitioned a drive on windows for the linux. But while installing from the bootable, I cannot see the partition. I am afraid I will lose my data, if I go ahead without seeing the partition.


title: How to download videos from Coursera with curl?

text: Downloading videos from Coursera is not as easy as copy and pasting the link in terminal. I also have tried exporting cookies from my browser in `cookie.txt` file and doing a:               curl --cookie cookie.txt "https://class.coursera.org/comnetworks-2012-001/lecture/download.mp4?lecture_id=37"      as suggested in this question but that produces a file named `download.mp4?lecture_id=37` with nothing in it. Can somebody tell me how can I download those video lectures? because downloading them with browser is a risk (I have a slow connection and if by chance if some error occurs my too much time is wasted in re-downloading it).


title: VIM substitute occurrences of pattern after a particular word in a line

text: I have such lines in my text. > text before pattern = garbage** text after pattern is pattern If in VIM I do `%s/pattern/saturn/` it replaces all occurrences of `pattern`. But I only want to replace those occurrences that come after `=`. It should ignore everything in the line that occurs before `=`. How to do that?


title: Can a shell script running in a ssh continue to run if the SSH instance closes?

text: I'm trying to write a shell script that does a lengthy batch job on a remote server. I'll be running the script over SSH. The thing is, I intend to start the script in the evening and collect the results the next morning; I'd prefer not to have my local computer have to run all night, as it's not needed as part of the batch process. As such, is there a way I can close the SSH connection and still have the shell script continue to run on the remote server?


title: Difficulty with mobile broadband device being recognized (registered as CD ROM)

text: I am running **_Ubuntu 10.04 LTS_** on a **Samsung n150 netbook**. I have bought a **vodafone** pay-as-you-go mobile broadband dongle. It is a **_Huawei_** device. I have ***usb_modeswitch*** installed. I installed **_betavine_** from betavineUbuntuLink. The program loads but displays that no device is detected. I tried to use **_Sakis3G_** from sakis3Glink, using both the free and full versions, and all I get is a message that it failed to connect. I tried to create the mobile broadband connection by right clicking the connection manager and setting it up from there but the connection is never registered or displayed. When the computer is booted with the usb dongle it shows on the desktop as a mounted device, and when unmounted and re-inserted it does not appear on the desktop again, but does appear in **_Places_** as `VMB_10.2.102.30707_RP171`. This usb dongle did not come with a CD for installation on Windows. In Windows, the software installed automatically from the usb device. So I believe that a further complication with this relatively new device is that it gets loaded as a CD. I tried a method of going to `gconf-editor` to uncheck the automount and autorun and see if the usb switching will work there after (I did a reboot), but this did not help. When I boot the computer with the dongle it is shown on the **_desktop_** and **_places_**. When it is removed and re-inserted it shows up in places only. A green light flashes and occasionally a blue one as well. I ran `lsusb` after removing and re-inserting the usb dongle, which shows that the device is found:               alex@alex-laptop:~/programFiles/MATLAB/bin$ lsusb     Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub     Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub     Bus 003 Device 002: ID 0a5c:219c Broadcom Corp.      Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub     Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub     Bus 001 Device 008: ID 12d1:14d1 Huawei Technologies Co., Ltd.      Bus 001 Device 005: ID 0ac8:c33f Z-Star Microelectronics Corp.      Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub      I then ran `dmesg | tail` to get the last kernel reports:               alex@alex-laptop:~/programFiles/MATLAB/bin$ dmesg|tail     [14373.720099] usb 1-7: new high speed USB device using ehci_hcd and address 8     [14373.997592] usb 1-7: configuration #1 chosen from 1 choice     [14374.182751] scsi6 : SCSI emulation for USB Mass Storage devices     14374.184812] usb-storage: device found at 8     [14374.184825] usb-storage: waiting for device to settle before scanning     [14379.184566] usb-storage: device scan complete     [14379.185273] scsi 6:0:0:0: CD-ROM            Vodafone CD ROM (Huawei)  2.31 PQ: 0 ANSI: 2     [14379.197689] sr0: scsi-1 drive     [14379.197986] sr 6:0:0:0: Attached scsi CD-ROM sr0     [14379.198192] sr 6:0:0:0: Attached scsi generic sg1 type 5     alex@alex-laptop:~/programFiles/MATLAB/bin$       It can be seen how the usb dongle device gets seen as a "Vodafone CD ROM (Huawei)" which I assume is the root of the troubles for `betavine` and `sakis3g`. I believe that the usual scenario is of seeing it as a drive and switching to broadband device and not as CD ROM and making that a mobile broadband device, but I could be wrong. Is there a course of action to be recommended to get this to work? Are there any alternative tests to perform to diagnose the exact problem? UPDATE: on the back of the usb modem it says "Model: K3770, HSPA USB Stick, FCC ID: QISK3770" UPDATE 2: On Ubuntuforums I found a thread, link to Unbuntu forum, and a post by foxy123 contained critical information. "Enter the APN as SMART. You'll also need a username and password. Both username and password are: web" Using **sakis3g** , and setting the extra options with this information assisted the final operation. This was done after following the post of ManWe.


title: Firefox 3.6 end of life when?

text: When will be Firefox 3.6 end of lifetime?


title: FreeNAS versus a regular (CentOS/Ubuntu) linux server?

text: I'm looking to build a medium sized (6TB, mini ITX board) server for personal use. Most importantly, it will serve as a seedbox and will store a whole lot of data. I will be accessing the data over my home network on a regular basis. I was looking around to decide which OS to use and fell upon FreeNAS. It looks pretty cool, but I was wondering if it would be able to do everything a regular server distro could do (package manager, easy updating, web server, etc). Is FreeNAS really only good for an actual NAS setup and not a server? (Bonus points if you also include FreeBSD as a possible server OS).


title: Is there any way to have console (rogue) mode programs take over only part of the terminal screen?

text: I like the command line because it preserves the context of what I'm doing. But if I use a "rogue" mode program like `vi` or `less`, the whole screen gets taken over. Is a middle way possible, where the console mode program takes over only half the screen (above or below the shell part)? I'm borrowing the term "rogue" from Eric Raymond: > Roguelike programs are designed to be run on a system console, an X terminal > emulator, or a video display terminal. They use the full screen and support > a visual interface style, but with character-cell display rather than > graphics and a mouse. I already use tmux and GNU screen to split the terminal into panes, but I'm looking for a way to stay in one shell session.