title: imagemagick's convert unexpectedly changing the background color

text: what I'm trying to achieve is to pull a simple graphic from a webserver and use imagemagick to change a few colors so that I can then further use this image. This is the imagemagick portion:               convert traffic.png -transparent "rgb(240,240,240)" traffic2.png     convert traffic2.png -fill "rgb(200,200,200)" -opaque black traffic2.png     convert traffic2.png -fill "rgb(200,200,200)" -opaque "rgb(0,200,0)" traffic2.png     convert traffic2.png -fill "rgb(200,200,200)" -opaque "rgb(0,130,0)" traffic2.png     convert traffic2.png -fill "rgb(200,200,200)" -opaque "rgb(150,150,255)" traffic2.png     # convert traffic2.png -fill "rgb(200,200,200)" -opaque "rgb(0,0,255)" traffic2.png      The problem I'm having is with the line that's currently commented out. What it should do in my opinion is change all occurrences of that blue to the same grey as specified, which it also does, but as soon as this line gets executed the previously transparent background turns into a solid color as well. Seeing how the syntax is the same I really don't know why this is happening. It works just fine when I try these commands on my local machine (OS X), but under Debian on my Raspberry Pi something seems to get in the way.


title: Pattern replacement

text: Please can anyone explain to me in brief the syntax of this command. Explanation in terms of how actually this command is written significance of each and every character used. I know the output of this command but want to learn how it is working .               sed -i 's|\(LAYOUT PATH \).*|\1 "../GDS/'$1'.gds"|g' drcCustimize2        Thanks in advance Yisha


title: How to make mk809III run linux like picuntu?

text: I bought a mini pc Android stick called "mk809 III" which is quad core and has 2 gig's of ram. I want to make it as my web server with Apache and MySql, to do this I got to install some linux distro on it. I had no luck installing picuntu on it. I am looking for a good tutorial to follow !


title: How to run commands automatically on gnome-terminal after log-in?

text: After each login, there's certain commands that I run on specific tabs of gnome-terminal. This is a tedious process, so can this be done automatically?


title: How to force rpm to check dependencies during upgrade?

text: We have a current version of our software that has a dependency on MySQL 5.1 and this is specified in the RPM requires. For our new version, we now require MySQL 5.5 and specify this in the RPM requires:               [root@NEC03 ~]# rpm -q -R mypackage     /bin/sh       /bin/sh       /bin/sh       /bin/sh       /usr/bin/mysql       config(flux) = 2.0.0.0-1     jdk >= 1.6     mysql-server >= 5.5.21     rpmlib(CompressedFileNames) <= 3.0.4-1     rpmlib(PayloadFilesHavePrefix) <= 4.0-1      However, when I run `rpm -Uvh mypackage.rpm` there is no exception about failing dependencies, although I only have MySQL 5.1 installed:               [root@NEC03 ~]# rpm -qa | grep -i mysql     MySQL-server-community-5.1.51-1.rhel5     MySQL-shared-community-5.1.51-1.rhel5     MySQL-client-community-5.1.51-1.rhel5      Any idea why rpm does not fail during the upgrade ? Update: The problem seems to be that `MySQL-server-community` provides `mysql-server` without a version number:               [root@NEC03 ~]# rpm -q --provides MySQL-server-community     MySQL       MySQL-server       config(MySQL-server-community) = 5.1.51-1.rhel5     ha_innodb_plugin.so.0()(64bit)       msqlormysql       mysql       mysql-server       MySQL-server-community = 5.1.51-1.rhel5      As a result, the version check in our requires is pretty useless and we will need to use 'MySQL-server-community' in the requires if version checking is needed, but MySQL 5.5 only provides MySQL-server with a version:               [root@NEC02 dependencies2.0]# rpm -q --provides MySQL-server     MySQL       MySQL-server       adt_null.so()(64bit)       auth.so()(64bit)       auth_socket.so()(64bit)       auth_test_plugin.so()(64bit)       config(MySQL-server) = 5.5.21-1.rhel5     libdaemon_example.so()(64bit)       libtcmalloc_minimal.so.0()(64bit)       msqlormysql       mypluglib.so()(64bit)       mysql       mysql-server       qa_auth_client.so()(64bit)       qa_auth_interface.so()(64bit)       qa_auth_server.so()(64bit)       semisync_master.so()(64bit)       semisync_slave.so()(64bit)       MySQL-server = 5.5.21-1.rhel5      As a result, it does not seem possible to fix the problem, since MySQL 5.1 also provides 'MySQL-server' without a version.


title: /etc/default/grub syntax error

text: How can I add kernel parameters with whitespaces to `GRUB_CMDLINE_LINUX_DEFAULT`? For example when I do:               GRUB_CMDLINE_LINUX_DEFAULT="quiet acpi_os_name=\"Microsoft Windows XP\""      followed by               grub-mkconfig -o /boot/grub/grub.cfg      I get the following `linux`-line in grub.cfg:               linux /vmlinuz-linux root=UUID=<long id> rw quiet acpi_os_name="Microsoft Windows XP"      If I boot with this grub.cfg, I get the following output during the boot process:               /init: eval: line 1: syntax error: unterminated quoted string      If I remove `acpi_os_name=\"Microsoft Windows XP\"` everything works as before. However the reason, I'm doing this, is an acpi fan problem with my notebook. So I'm following this article in order to make the fan work: https://wiki.archlinux.org/index.php/DSDT **Edit 0:** The output of `uname -s -r -v` is:               Linux 3.13.8-1-ARCH #1 SMP PREEMPT Tue Apr 1 12:19:51 CEST 2014


title: Thunderbird fails to connect to Dovecot and Postfix

text: I set up Dovecot and Postfix, but when I try to authenticate with Thunderbird, it gives this error: "Thunderbird failed to find the settings for your email account."               ==> /var/log/dovecot-info.log <==     Apr 06 10:42:16 auth: Debug: auth client connected (pid=13243)     Apr 06 10:42:16 imap-login: Info: Disconnected (no auth attempts): rip=76.xx.xx.xx, lip=172.31.15.65, TLS: SSL_read() failed: error:14094412:SSL routines:SSL3_READ_BYTES:sslv3 alert bad certificate: SSL alert number 42          ==> /var/log/maillog <==     Apr  6 10:42:16 ip-172-31-15-65 postfix/smtpd[13238]: lost connection after UNKNOWN from user-xxxxxx.cable.mindspring.com[76.xx.xx.xxx]     Apr  6 10:42:16 ip-172-31-15-65 postfix/smtpd[13238]: disconnect from user-xxxxxx.cable.mindspring.com[76.xx.xx.xx]      I can connect with telnet. Here is the Thunderbird error. ![Imgur](http://i.imgur.com/dT1G2US.png)


title: Add arguments when completing a command name

text: I am looking for a way to expand some predefined strings in the terminal when tab (or another key combination) is pressed. This is different from tab completion. My terminal already expands ~ to my home directory (I cannot remember how I figured it out, but I am pretty sure this is just an special case of what I am looking for). **Examples:** Assume you type `cdd` and press tab, it is expanded to `cd /your/home/folder/Downloads/` and the cursor is placed at the end of the line. So, you can type the name of a folder inside the `Downloads` folder and run the command. A better example would be to expand `sshu` to `ssh |@a-pre- defined-host.foo` and place the cursor behind the `@` sign to type in the username. The is similar to code snippet expansion capability in many IDEs. Please don't say I can achieved the same thing through bash functions with parameters written in `.bashrc` file. **What is the point?** So what's the point of using such a thing compared to a function call? Well, unlike many of you command-liners, I don't have a good memory. Even for the commands that I use frequently, I cannot remember the details such as the parameters. I usually search the web for things like "how to POST a json file using curl?". Well, I can create a function that accepts a file name, a host name, a port name and probably a few other parameters and do the POST. But, remembering the parameters and the order of them is not simpler than remembering the whole command then. With the snippet expansion, I only need to remember the name of the snippet, something like `snppost`, or maybe I dont even need to remember the name of the snippet. I can type `snp` and press tab to get a list of snippets, find the one that I am looking for. Press tab again to expand the snippet. And I have the command that I was looking for without searching the web and copy/pasting. I can do whatever customization that I like to the command and run it.


title: What are the responsibilities of each Pseudo-Terminal (PTY) component (software, master side, slave side)?

text: I am trying to figure out **how a tty works** 1 (the work-flow and responsibilities of each elements). I have read several interesting articles about it, but there are still some blurry areas. This is what I understand so far:   * The emulated terminal makes different system calls to `/dev/ptmx`, the master part of the pseudo-terminal.   * The master part of the pseudo terminal allocates a file in `/dev/pts/[0-N]`, corresponding to the obsolete serial port, and "attaches" a slave pseudo terminal to it.   * The slave pseudo terminal keeps information such as session Id, foreground job, screen size. Here are my questions:   1. **Has ptmx** any purpose besides allocating the slave part? Does it provide **some kind of "intelligence"** , or the emulated terminal (xterm for instance) has all the intelligence of behaving like a terminal?   2. **Why does xterm** has to interact with the master part, as it only forwards the stdout and stdin of the slave part? Why can't it **directly write and read from the pts file**?   3. Is a session ID always attached to one pts file and vice versa? Could I type a ps command and found **2 sessionId for the same /dev/pts/X**?   4. What other information does the `pts` store? Does Xterm update all fields by himself, or does the `ptm` add some "intelligence" on it? * * * 1. I base my understanding on the TTY demystified by Linus Akesson, and the Linux Kernel by Andries Brouwer posts, as on several other questions on these sites


title: Prevent transparent font on Termite when using Compton

text: Termite dropped their Opacity-Option, so you have to define a Opacity-Rule in Compton to make the Terminal transparent, _and the font is also transparent_. How can I change that? Anybody has an Idea? In a related Question I've asked there is an Image in the accepted Answer that looks like the Font is non-transparent... ranger image-preview with transparent terminal background


title: Full username in top

text: On our systems user names can be up to 20 characters long. But the `top` commands only displays the first 8 characters. How can I configure `top` to display the whole user name? At the moment we use: top procps version 3.2.8 (linux) But a different top implementation could be installed. The oldest system we need to support is this: `Linux foohost 2.6.37.1-1.2-desktop #1 SMP PREEMPT 2011-02-21 10:34:10 +0100 x86_64 x86_64 x86_64 GNU/Linux `


title: Multiple liveCDs on one USB

text: Is there an easy way to install multiple liveCDs ont a USB drive? Specifically kubuntu and arch. I'm just wondering if there's an easy way to do this since both distros include their own boot loader when installed the way they suggest.


title: What's a good lightweight distribution to run on old hardware?

text: I need run a good Linux distribution on an old notebook with Athlon 1.2 and 128MB. I tried use a lite version of Win XP and some popular Linux distros but all of them was too heavy to this machine. The distro need be ease to use by a beginner user. It don't need be small, just light. I did a lot of research including here and I can't get a good answer.


title: ZSH autocomplete

text: How do I make zsh give me the autcomplete options but not fill in the prompt line with the first result? For example, this is the behavior I'm seeing:               $ ifc{tab}               $ ifcfg     external command     ifcfg     ifconfig      I want it to display the options, but not fill in the prompt line. Also, if I type in a valid command, but there are other valid commands that start with that, it doesn't auto complete. So               su{tab} will give me just `su` instead of the option for `sudo`


title: How to delete mails from queue of Dragonfly Mail Agent (dma)

text: I have the Dragonfly Mail Agent installed. Is there a way to delete mails from its outgoing queue without going manually to `/var/spool/dma` and deleting them by hand?


title: Installing Upstart on Centos 5.10 Final… pkg-config dependency issue

text: I am trying to install upstart version 1.11 from source on a Centos 5.10 Final box. BTW I don't have option or privileges to upgrade this. I am at this point where it is complaining about the pkg-config package as being old and not recent enough to see through the installation. Below is the error message. Does anyone know what and/or how to set these environment variables?   * NIH_LIBS    * NIH_CFLAGS    * DBUS_CFLAGS   * NIH_DBUS_CFLAGS I suppose that this will enable me bypass pkg-config               checking pkg-config is at least version 0.22... no     checking for nih-dbus-tool... no     checking for NIH... no     configure: error: in `/home/dev/src/upstart-1.11':     configure: error: The pkg-config script could not be found or is too old.  Make sure it     is in your PATH or set the PKG_CONFIG environment variable to the full     path to pkg-config.          Alternatively, you may set the environment variables NIH_CFLAGS     and NIH_LIBS to avoid the need to call pkg-config.     See the pkg-config man page for more details.          To get pkg-config, see <http://pkg-config.freedesktop.org/>.     See `config.log' for more details


title: Why are some files and folders hidden?

text: I can understand the rationale of hiding files and folders in the `/home/user` directory to prevent users from messing around with things. However, I do not see how the same rationale can be applied to files in the `/etc`, `/boot` and `/var` directories which is the domain of administrators. My question is why are some files and folders hidden from administrators? Example:               /boot/.vmlinuz-3.11.1-200.fc20.x86_64.hmac     /etc/.pwd.lock     /etc/selinux/targeted/.policy.sha512     /etc/.java     /etc/.java/.systemPrefs     /etc/skel/.bash_profile     /root/.ssh     /root/.config     /var/cache/yum/x86_64/20/.gpgkeyschecked.yum     /var/spool/at/.SEQ     /var/lib/pear/.filemap


title: Downgrading packages with pacman

text: What is the best, or most suitable, method of **downgrading** packages in _Arch_? On normal days I just run the following to accomplish a quick downgrade:                # pacman -Rd <broken-package>      # pacman -U  <older-stable-package-pkg.tar.gz>      But today I am downgrading my _kernel_ , which is a very vital part of my linux life. I'd like to do it correctly. Is this the proper way? If not, what is?


title: How to switch mailboxes in mutt?

text: I want to switch between "Sent" mailbox and current mailbox, I use the maildir type. It's best If there could be a macro bound to a shortcut key


title: Changing screen resolution/geometry of a vncserver without randr in Linux

text: I want to change the resolution / geometry of my VNC session dynamically without affecting the programs running inside it. I referred: Changing the resolution of a VNC session in linux. I don't have root permission to update the newer vncserver version, so following command doesn't work as of now:               vncserver -geometry 1280x1024 -randr 1280x1024,1280x800      For now, whenever I want to change the screen size from one monitor to other, I kill the session and restart it with modified `-geometry` option. Due to this I have to loose the programs inside it. Is there any way to hack the file which stores the geometry and change the values for changing the resolution? I couldn't find such file. In my home folder, I see below files:               mgandhi@starbase:~/.vnc$ ll     total 12     -rwxr-xr-x 1 mgandhi bc  334 Jun 25 10:32 xstartup     -rw------- 1 mgandhi bc    8 Jun 25 10:32 passwd     -rw-r--r-- 1 mgandhi bc    6 Jun 25 11:08 starbase.radisys.com:23.pid     -rw-r--r-- 1 mgandhi bc 1664 Jun 25 11:08 starbase.radisys.com:23.log      The contents of `xstartup` file doesn't help:               #!/bin/sh          # Uncomment the following two lines for normal desktop:     # unset SESSION_MANAGER     # exec /etc/X11/xinit/xinitrc          [ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup     [ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources     xsetroot -solid grey     vncconfig -iconic &     xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &     twm &      ... here `xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &` line remains constant for any resolution. [Note: I see that `xrandr` is installed in the linux machine.]


title: I can't get any internet connection on Crunchbang, how can I download and manually install the drivers?

text: I recently installed crunchbang on my Lenovo G505 Laptop, it uses broadcom drivers and I can't get any type of connection. I have tried connecting it with an ethernet cable every way that I could and it doesn't even detect anything, it does not detect any wireless connections either. Can I download the drivers I need, put them on a flash drive, put them on the laptop and install them that way? If I can then how exactly can I do this? I don't have a ton of experience with this, crunchbang replaced ubuntu which was my previous OS, I also ran into trouble connecting with that but got lucky and was able to connect through my router with an ethernet cable which isn't working this time. These are the drivers for the laptop - support.lenovo.com/en_US/downloads/detail.page?&DocID=DS035826 , I found broadcom drivers for linux but have no idea what to do with them - ://www.broadcom.com/support/802.11/linux_sta.php


title: how to redirect terminal output to multiple log files

text: I've been trying redirect output to logfiles but should _NOT_ be displayed on terminal, but following command does output both on terminal and in logs. Any ideas are appreciated. `(some_cmd | tee -a log1 log2) 2>&1`


title: Change lightdm background

text: Seen similar question many times on AskUbuntu, but most answers was bout unity-helpers or gconf ...canonical... etc, so this actually doesn't seem to work.   The problem is that I decided to move to lightdm from gdm. Yep, it works,but I can't setup background image to it - always getting black bg color in exchange of picture.   My configs:               tempos@parmasse ~ $ cat /etc/lightdm/lightdm-gtk-greeter.conf      #     # logo = Logo file to use, either an image absolute path, or a path relative to the greeter data directory     # background = Background file to use, either an image path or a color (e.g. #772953)     # theme-name = GTK+ theme to use     # icon-theme-name = Icon theme to use     # font-name = Font to use     # xft-antialias = Whether to antialias Xft fonts (true or false)     # xft-dpi = Resolution for Xft in dots per inch (e.g. 96)     # xft-hintstyle = What degree of hinting to use (hintnone, hintslight, hintmedium, or hintfull)     # xft-rgba = Type of subpixel antialiasing (none, rgb, bgr, vrgb or vbgr)     # show-language-selector (true or false)     #     [greeter]     #logo=     background=/usr/share/backgrounds/lightdm.jpg     #background=#772953     #theme-name=Adwaita     #icon-theme-name=gnome     #font-name=     #xft-antialias=     #xft-dpi=     #xft-hintstyle=     #xft-rgba=     show-language-selector=true      The file itself:               tempos@parmasse ~ $ ls -la /usr/share/backgrounds/lightdm.jpg     -rwxrwxrwx 1 root root 1362684 авг 14 12:36 /usr/share/backgrounds/lightdm.jpg


title: Update kde to newest version

text: My OS is debian squeeze and I installed kde as graphical interface. My current kde version is 4.4.5. But I want to update it to the newest version (4.10.5). How to do it? (I am a newbie).


title: Diff the output of two `awk` commands

text: I'm trying to compute the difference between the output of two `awk` commands but my simple attempts at it seem to be failing. Here is what I'm trying:               diff $(awk '{print $3}' f1.txt | sort -u) $(awk '{print $2}' f2.txt | sort -u)      This doesn't work for reasons unknown to me. I was under the assumption that `$()` construct was used to capture the output of another command but my "diff" invocation fails to recognize the two inputs given to it. Is there any way I can make this work. By the way, I can't use the obvious solution of writing the output of those two commands to separate files given that I'm logged on to a production box with no 'write' privileges.


title: How to monitor CPU/memory usage of a single process?

text: I would like to monitor one process's memory / cpu usage in real time. Similar to `top` but targeted at only one process, preferably with a history graph of some sort.


title: Where does the output from an application started from the window manager go?

text: If you start an application from a terminal you can see the output to stdout and stderr, but if an application is started from the window manager, where does the output to these files typically go? To /dev/null?


title: Easy incremental backups to an external hard drive

text: For a while I used Dirvish to do incremental backups of my machines, but it is slightly cumbersome to configure, and if you do not carry a copy of your configuration it can be hard to reproduce elsewhere. I am looking for backup programs for Unix, Linux that could:   * Incrementally update my backup   * Create "mirror" trees like dirvish did using hardlinks (to save space)   * Ideally with a decent UI


title: Getting the parent path from a script

text: I have a bash script `foocaller`, which calls a ruby script `foo`: **foocaller**               /path/to/foo      Within `foo`, I want to get the path of `foocaller`. Following this suggestion, I put the following code to do that: **foo**               #!/usr/bin/env ruby     puts File.read("/proc/#{Process.ppid}/cmdline")      When I run:               $ bash foocaller      then I get the desired:               bash^@/path/to/foocaller      but when I directly call `foocaller`:               $ foocaller      then I get this:               /bin/bash^@--noediting^@-i      which does not show the path to `foocaller`. How can I get the path to `foocaller` by directly calling `foocaller` without `bash`?


title: ATA_PIIX Driver Source Code

text: Is it possible to find the source code for the ATA_PIIX Driver outside the linux kernel? I have to install an older version of Linux (SuSE 10) on a brand new laptop and its failing to see the drive. I'd like to get a newer version of the driver to build for use in the automated build process.


title: Finding text between two specific characters or strings

text: Say I have lines like this:               *[234]*     *[23]*     *[1453]*      where `*` represents any string (except a string of the form `[number]`). How can I parse these lines with a command line utility and extract the number between brackets? More generally, which of these tools `cut`, `sed`, `grep` or `awk` would be appropriate for such task?


title: script to use the output of a command (ls) and use it in another command

text: I have a collection of pdf files I would like to convert to epub. I know Calibre's command `ebook-convert` will do the trick (nicely might I add). However I have more than one file. I'd like to be able to run a script that runs `ls > file` then something runs through said file and parses it so each entry is a variable. Then uses the variables to as the input file for `ebook-convert`; and somehow have the variable as the output file but append a `.epub` to the end of the file name?


title: Where is the environment string actual stored?

text: > But when we first time we adding a new name,we have to call malloc to obtain > >room for a new list of pointers. We copy the old environment list to this > new area and store a pointer to the name=value string at the end of the list > of pointers.But most of the pointers in this list still point to name=value > strings above the top of the stack(said in the Advanced Programming in the > UNIX Environment.).It sounds like that are there any new created environment > lists or strings stored in the queue.


title: Java installation having issues on Centos java and javac showing different version

text: I have this package of java jdk-7u3-linux-x64.rpm. So I have been doing this normally yum install jdk-7u3-linux-x64.rpm. Then immediately I will do this               alternatives --install /usr/bin/java java /usr/java/latest/jre/bin/java 20000          alternatives --install /usr/bin/javaws javaws /usr/java/latest/jre/bin/javaws 20000          alternatives --install /usr/bin/javac javac /usr/java/latest/bin/javac 20000      Next step is this alternatives --config java and pick the latest one. Suddenly this particular machine I am having issue when I run this 2 commands it shows me different version of java and javac causing my programme cant be compiled. Below is all the java alternatives --config java               There are 4 programs which provide 'java'.            Selection    Command     -----------------------------------------------     *  1           /usr/lib/jvm/jre-1.7.0-openjdk.x86_64/bin/java        2           /usr/lib/jvm/jre-1.6.0-openjdk.x86_64/bin/java        3           /usr/lib/jvm/jre-1.5.0-gcj/bin/java      + 4           /usr/java/latest/jre/bin/java          Enter to keep the current selection[+], or type selection number:      Java version is as below               java -version     java version "1.7.0_03"     Java(TM) SE Runtime Environment (build 1.7.0_03-b04)     Java HotSpot(TM) 64-Bit Server VM (build 22.1-b02, mixed mode)      But my javac -version is               javac -version     javac 1.7.0_19      I am very surprise where does the 1.7.0_19 comes from cause my installation version is just 1.7.0_03? Any idea how to resolve this?


title: BASH: launch background process and check when it ends

text: How can I launch a process in background and check when it ends within a bash script? My idea is a script like this:               launch backgroundprocess &     while [ Process is running ];do        echo "PROCESS IS RUNNING\r"     done;          echo "PROCESS TERMINATED"


title: Changing timezone on Debian keeps Local Time in UTC

text: I'm trying to get programs to log in local time for my own sanity. I have updated my timezone with:                dpkg-reconfigure tzdata      But the result of that command is:               Current default time zone: 'Australia/Adelaide'     Local time is now:      Mon May 20 03:09:52 UTC 2013.     Universal Time is now:  Mon May 20 03:09:52 UTC 2013.      Notice the **UTC** in `Local time` Any reason why this may be? I have done a lot of Googling but my problem seems different to all of them :( **Here are some more details:**               # cat /etc/timezone     Australia/Adelaide          # date     Mon May 20 03:41:06 UTC 2013          # export TZ='Australia/Adelaide'; date     Mon May 20 13:16:11 CST 2013      Setting `export TZ='Australia/Adelaide';` in my `/etc/profile` makes `date` work by default in a bash session but does not change the system log date (after restarting the service) **Edit:**               # ls -l /etc/localtime     lrwxrwxrwx 1 root root 20 May 10 14:48 /etc/localtime -> /usr/share/zoneinfo/          # ls /etc/localtime/     Adelaide    Chile    GMT        Japan      PST8PDT    Universal     Africa      Cuba     GMT+0      Kwajalein  Pacific    W-SU     America     EET      GMT-0      Libya      Poland     WET     Antarctica  EST      GMT0       MET        Portugal   Zulu     Arctic      EST5EDT  Greenwich  MST        ROC        iso3166.tab     Asia        Egypt    HST        MST7MDT    ROK        localtime     Atlantic    Eire     Hongkong   Mexico     Singapore  localtime.dpkg-new     Australia   Etc      Iceland    Mideast    SystemV    posix     Brazil      Europe   Indian     NZ         Turkey     posixrules     CET         Factory  Iran       NZ-CHAT    UCT        right     CST6CDT     GB       Israel     Navajo     US         zone.tab     Canada      GB-Eire  Jamaica    PRC        UTC      ## Answer: Worked it out thanks to jamzed. for some reason I had /etc/localtime as a symlink... the IT Guy here set up the server using Turnkey 12 so maybe that was the problem.               # mv /etc/localtime /etc/localtime.old     # cp /usr/share/zoneinfo/Australia/Adelaide /etc/localtime     # date     Thu May 23 09:36:17 CST 2013


title: Custom application running on embedded device - do I need to register my listening port in /etc/services?

text: I have written an application that will run on an embedded device. The installation is very minimal and uses busybox and not many other things. Part of the software includes a listener thread that accepts incoming TCP/IP connections. The port number I used does not exist within the devices `/etc/services` file so I know this port is available, but I am wondering if I need to register this port in some way so that no other utilities are able to use it? Is there anything explicit I need to do myself to register a listening port or will the socket system functions deal with all of this for me behind the scenes? Or does the fact that the port I wish to use is not present in `/etc/services` mean that I do not have to worry at all about this aspect of my application?


title: What's the difference between a screen being attached and detached?

text: [blah]$ screen -ls     There are screens on:             16517.pts-0.blah       (01/28/2012 01:55:32 PM)        (Detached)             4345.pts-1.blah     (01/27/2012 11:22:48 AM)        (Attached)     2 Sockets in /var/run/screen/S-blahblah.      Got 2 questions 1) What's the difference between attached and detached screen 2) Can you kill attached and detached screen and how do you do it? (I killed attached screen with screen -X -S id kill before but I don't think it works on detached one)


title: Undefined reference to symbol 'acs_map' when running makeconfig

text: I get a linker error when I try to configure the Linux kernel with `menuconfig`:               # make menuconfig       HOSTLD  scripts/kconfig/mconf     /usr/local/bin/ld: scripts/kconfig/lxdialog/checklist.o: undefined reference to symbol 'acs_map'     /usr/local/bin/ld: note: 'acs_map' is defined in DSO /lib/libtinfo.so.5 so try adding it to the linker command line     /lib/libtinfo.so.5: could not read symbols: Invalid operation     collect2: ld returned 1 exit status     make[1]: *** [scripts/kconfig/mconf] Error 1     make: *** [menuconfig] Error 2      Any idea as to what is wrong with it? I'm running CentOS 6.2 and I'm sure I've installed all the needed libs.


title: Is there a config file for telnet that's similar to .ssh/config?

text: I constantly need to type some hostnames / IPs to telnet, and sadly they don't support ssh. Is there a config file for telnet similar to ssh? I don't have admin access to change the `/etc/hosts` file.


title: Having xwin start by default on system boot

text: My system boots into a console, from which I can launch my gnome desktop by issuing the command `startx`. How can `X` be instructed to start by default upon boot? The commands `/etc/init.d/gdm3 start` and `/etc/init.d/gdm3 restart` have no effect.


title: github ssh problem- permission denied(publickey)

text: I tried setting up git as shown in Github's help page, on Arch linux but there seems to be some problem with the SSH keys. It gives this error-               Permission denied (publickey).      This problem is documented in the troubleshooting page but I when I tried the procedure shown there, it didn't really solve the problem. How can I solve this problem?


title: How to make the terminal display user@machine in bold letters?

text: I have seen in some screen-shots (can't remember where on the web) that the terminal can display the `[username@machine /]$` in bold letters. I'm looking forward to getting this too because I always find myself scrolling through long outputs to find out with difficulty the first line after my command. How can I make the user name etc. bold or coloured?


title: Where can I download the hash of an OpenBSD release ISO?

text: To check that it's 100% ok, and to check that it doesn't containt anything "bad" :)      I tried to google but with no luck. Of course it's need to be downloaded over a secure connection, HTTPS!      Thank you!


title: What happens if you add a vlan-device to an interface that already is a vlan device?

text: When configuring an application that creates vlans by using `vconfig add`, I discovered that it was adding a vlan device to something that was already a vlan device. Effectively, what happened was:               # vconfig add bond0 168      ...     # vconfig add bond0.168 100       The vlan100 interface was then attached to a bridge which connects to a KVM instance:               # brctl addbr br100     ...     # brctl addif br100 vlan100      Here's what the bridges look like:               # brctl show     bridge name     bridge id            STP enabled     interfaces     br100           8000.02163e4fc8db    no              vlan100                                                          vnet0     virbr0          8000.000000000000    yes              Oddly enough, everything seemed to work, I was able to ssh to my KVM instance. What happens when you add a vlan-device to an interface that is already a vlan device? In particular, what VLAN tag do the ethernet frames have that go to the VM instance?


title: How to generate a year-quarter date from the command line?

text: I'm interested in outputting a representation of the current year-quarter, as well as the year-quarter for the previous month. If today is 2012 January 1st, I'd like to get               2012q1      and               2011q4      as the respective outputs.


title: What are my choices when I want to convert DVD format to AVI under Linux?

text: What software is out there there to help me convert to AVI from DVD?


title: selecting specific string in a field

text: I have this file:               N104    F1810     N104    F3810     N104    F810     N104    F305      and a script to `grep` an input. Script:               enter input     read input     cat file | grep $input      when I input “810”, I get the output:               N104    F1810     N104    F3810     N104    F810      I need the output:               N104  F810      Can you help?


title: How to include local header files in linux kernel module

text: Say I have a module `mymod` with source files as follows: > src/mod/mymod.c   >  src/inc/mymod.h I try to include mymod.h as follows               #include <mymod.h>      My makefile contains `EXTRA_CFLAGS= -I$(shell pwd)/../inc/` but when the kernel is made, I get an error stating: > mymod.h not found The reason seems to be that when kernel modules are made this command gets run from the makefile: (using `make` V1):               make -C <path/to/linux/src> M=<path/to/mymod> modules      In other works my `$(shell pwd)` got expanded to `<path/to/linux>`. This is not what I want. How can I specify the `-I` parameter to point to `src/inc` of my `mymod` source tree?


title: Is there any difference between e2fsck and e4fsck on CentOS / RHEL systems?

text: ext4.wiki.kernel.org makes it sound like e2fsck was simply renamed to e4fsck so that e4fsprogs and e2fsprogs could coexist without overlapping. However, there is no mention of any difference in the code of the command. The e2fsck man page makes no mention of ext4, but does mention that it works with ext3 (i.e. ext2 with journaling turned on). For Ubuntu, apparently e2fsck can handle ext2, 3 **_and_** 4 filesystems. And of course there's good ol' vanilla fsck which itself makes no mention of ext4. If I need to fsck an ext4 file system on a RHEL based system, which tool do I use? e4fsck? But if it's just a rename of e2fsck, can I just use that instead? Why does Ubuntu mention ext4 in its e2fsck man page but no one else seems to? And what about plain fsck on ext4? **EDIT:** On a Fedora 14 machine there is fsck.ext4, fsck.ext3 and fsck.ext2 in /sbin/. They all have the exact same file size. Curioser and Curioser. **EDIT 2:** Furthermore, when running fsck.ext4, you see that it appears to be e2fsck running. For example, I see this line when running fsck.ext4: `e2fsck: aborted` Tricksters!


title: Why does source give an error "cannot execute binary file"

text: I have small file that does initialize a `tmux` session and then creates some windows. After some debugging and tweaking things worked fine until I renamed the text file (with the `tmux` commands) from `spam` to `xset`:               $ source xset     bash: source: /usr/bin/xset: cannot execute binary file      I have now renamed the file back and `source spam` works again, but I am wondering why this is. The file is in my home directory, and not in `/usr/bin`.


title: Difference between vim’s normal-mode S and cc commands?

text: Is there a difference between the vim normal-mode commands `S` and `cc`? In my use cases, both commands seem to delete the current line and move into insertion mode.


title: Bash to print out the make result

text: To compile my project and to check if it's good or not, I want to print out the status message after make command. Which one should I use?               make && echo “Success” || echo “Fail”     make || echo “Fail” && echo “Success”     make || echo “Success” && echo “Fail”      I should use the first one right?


title: Will there be any security problem to permit non-root user set up a loopback devices?

text: if the user has full access to the image file (iso or disk image), will there be any security problem to permit him set up a loopback device backed by this file ?               % ls -al /dev/loop*                                                                                brw-rw---T 1 root disk  7,   0 Jul 15 16:39 /dev/loop0     brw-rw---T 1 root disk  7,   1 Jun 17 15:58 /dev/loop1     brw-rw---T 1 root disk  7,   2 Jun 17 15:58 /dev/loop2     brw-rw---T 1 root disk  7,   3 Jun 17 15:58 /dev/loop3     brw-rw---T 1 root disk  7,   4 Jun 17 15:58 /dev/loop4     brw-rw---T 1 root disk  7,   5 Jun 17 15:58 /dev/loop5     brw-rw---T 1 root disk  7,   6 Jun 17 15:58 /dev/loop6     brw-rw---T 1 root disk  7,   7 Jun 17 15:58 /dev/loop7     crw------T 1 root root 10, 237 Jun 17 15:58 /dev/loop-control      the `loopX` is belonged to `disk` group               % id     uid=1000(user) gid=1000(user) groups=1000(user),6(disk)      I'm in `disk` group. So, I can use the loopback device               % /sbin/losetup -f ~/disk.img          % /sbin/losetup -a     /dev/loop0: [0809]:2097347 (/home/user/disk.img)      But any user isn't in `disk` group can't use the loopback device, is there any problem to permit everyone to use the loopback ? PS: by using mount namespace, any user can mount disks, but the root requirement of loopback device prevent user from mounting disk images.


title: Setting umask for su root

text: In my user account I set the `umask` to be `022` with my `.bashrc`, but I want root to use a `umask` of `077` no matter how I become root (e.g., logging in directly as root on a tty or using sudo or su). If I login to a tty as root, I get `077`, so it is fine. For `sudo` in `/etc/sudoers` I have set               Defaults umask = 0022     Defaults umask_override      and I get `077`, so again fine. For `su`, in /root/.bashrc I can set               umask 022      and I get a `umask` of `077`, but I am not convinced this is the correct way to do it. How do you set the `umask` for `su root` Potentially relevant is that my `/etc/login.defs` has               UMASK           077     USERGROUPS_ENAB yes


title: find ount what [flush-8:0] is writing

text: Using `iotop`, I found out that [flush-8:0] is doing a lot of hard disk activity, which explains the annoying slowdowns. However, I can't figure out what's the actual cause behind this flushing. No other process seems to be doing inordinate amounts of IO. And you can't `strace` a kernel task. I've also enabled IO debugging (via `echo 1 >/proc/sys/vm/block_dump`), but it gives me block numbers on a JFS filesystem, and I have no idea how to translate those into filenames (just try a web search to see what you get). I actually have a suspect, a `java` process that seems to cause hard disk activity whenever I interact with it. But `strace -eread,write,open,stat -fp $PID` show very little activity. Are there any other syscalls that could cause problems? Any other ideas?


title: How to create and sign a RPM-package with RedHat 4, that works with YUM?

text: How do I make a signed RPM package for my binary? I need to distribute my binary as a signed RPM package on RHEL 4 using GPG. It's for distribution of my binary with YUM ( http://yum.baseurl.org ). Any help and guidance is appreciated.


title: How to replace sysvinit with systemd in debian?

text: I've been using systemd for a while in my Debian installation, just that to make it possible I had to add a boot parameter to the `/etc/default/grub` file to make it work, which is added to Ubuntu boot parameters. Ubuntu doesn't have installed systemd yet so I have to remove it or the boot can fail. So, I'm looking for a way to replace sysvinit with systemd and remove the boot parameter, how would I do this?


title: apt-get install gives 404 not found, but URL works

text: I am trying to set up an apt repository. This repository is actually replacing one that already exists and is functioning fine. I can't manage to install a package from this repo. In my `/etc/apt/sources.list`, I have the line:               deb http://mirror.cs50.net/appliance50/2014/debs/dists/trusty/main/binary-i386 /      An `apt-get update` goes through perfectly fine. But then something like `apt- get install appliance50` (a package in that repo) gives me:               Err http://mirror.cs50.net/appliance50/2014/debs/dists/trusty/main/binary-i386/  appliance50 2014-0       404  Not Found     E: Failed to fetch http://mirror.cs50.net/appliance50/2014/debs/dists/trusty/main/binary-i386/./appliance50_2014-0_i386.deb  404  Not Found          E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?      But then copying that URL into a browser downloads the file just fine! Is there some fundamental step that I'm missing? Does it have to do something with the fact that this server is redirecting the request to S3? Edit: Here's the output of "sudo apt-get -o Debug::Acquire::Http=true install appliance50", per the comment:               root@ubuntu:~# sudo apt-get -o Debug::Acquire::Http=true install appliance50     Reading package lists... Done     Building dependency tree     Reading state information... Done     The following packages were automatically installed and are no longer required:       apt-clone archdetect-deb cifs-utils dmraid dpkg-repack       gir1.2-appindicator3-0.1 gir1.2-json-1.0 gir1.2-timezonemap-1.0       gir1.2-xkl-1.0 kpartx kpartx-boot libdebian-installer4       libdevmapper-event1.02.1 libdmraid1.0.0.rc16 libldb1 libntdb1 libtalloc2       libtevent0 libtimezonemap1 libwbclient0 localechooser-data lvm2 lzma       python-crypto python-ldb python-ntdb python-samba python-talloc python-tdb       python3-icu python3-pam rdate samba-common samba-common-bin samba-libs       watershed     Use 'apt-get autoremove' to remove them.     The following packages will be upgraded:       appliance50     1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.     Need to get 1,205 kB of archives.     After this operation, 4,096 B of additional disk space will be used.     0% [Working]GET /appliance50/2014/debs/dists/trusty/main/binary-i386/./appliance50_2014-0_i386.deb HTTP/1.1     Host: mirror.cs50.net     User-Agent: Debian APT-HTTP/1.3 (1.0.1ubuntu2)               HTTP/1.1 404 Not Found     Cache-control: no-cache="set-cookie"     Content-Type: text/html; charset=UTF-8     Date: Mon, 04 Aug 2014 14:23:53 GMT     Server: Apache     Set-Cookie: AWSELB=27CBB9F102866AACDE415904FB505399868B9DB4E22AC5183099E4BEEC583EF1DFA3B6E45DCB1D708481F98DC786A644C763A900F7898475BA865AD219D4E4F1F157545837;PATH=/;MAX-AGE=3600     Content-Length: 0     Connection: keep-alive          Err http://mirror.cs50.net/appliance50/2014/debs/dists/trusty/main/binary-i386/  appliance50 2014-0       404  Not Found     E: Failed to fetch http://mirror.cs50.net/appliance50/2014/debs/dists/trusty/main/binary-i386/./appliance50_2014-0_i386.deb  404  Not Found          E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?


title: Script to create files in a template

text: I just wrote a function in my `~/.bashrc` that will let me create a folder for a new website with one command. The function looks like this:               function newsite() {       mkcd "$*"  # mkdir and cd into it       mkdir "js"       mkdir "imgs"       touch "index.html"       touch "main.css"       vim "index.html"     }      Woo hoo super complicated function... Okay in all seriousness I understand this is really basic, it's the first function I've made without copy and pasting from online though so bear with me. Now what I would like to do is, instead of just touching index.html and main.css I'd like to create basic template files for index.html and main.css problem is I have absolutely no idea how to do that. I don't know much about writing to files using bash commands. Typically I'd just open the files in vim and go to town but I'd like to have something already started when I get into vim...


title: Attach files for sending mail which are the result set of find command

text: By using find command I got multiple files. Now I want to add all these files as mail attachment. Please help me how to add these files as attachment in single mail. I want to implement this in script. Do I need to use for loop and store the files in array variables? please help me. EX: I got 3 files results by the following find . -type f -name "sum*" result:               sum123.pdf     sum234.pdf     sum453.pdf      Thanks in advance.


title: Pass output of a command as arguments to another(non-blocking)?

text: I was wondering how I can iterate over each line of the output of a command and pass it as command line arguments to another one. I want to do this in a non-blocking fashion as the output never reaches an EOF. To be more precise I want to take each line of output from `acpi_listen` and pass it to a user-level acpi handler script similarly to what acpid does as root(eg. "button/lid LID close" where $1="button/lid" $2=LID $3=close).


title: Is it possible to force chromium show the "window control icons" on the left

text: I'm not running Gnome or Ubuntu, ![enter image description here](http://i.stack.imgur.com/D4FJg.png) But I also want those (minimize, maximze, close) icons to be visible on the left as well, without touching the source code, is there any way to make it work ? **EDIT** I prefer the icon s provided by chromium, I uploaded the wrong screenshot, it's updated now ! I'm on XFCE4, Arch Linux **EDIT2** Hmm, read part of the source code, and I nailed it with a very dirty method, but still looking for other methods ... ![enter image description here](http://i.stack.imgur.com/QFKY8.png)


title: How to set bash to run *.exe with mono?

text: Without any DE or even X, I want to use `./my.exe` to run `mono my.exe`, like it works with python scripts.


title: zfs replication temporary file

text: I'm running a zfs replication task, of a snapshot size ~2.5GB. I see that there is traffic going between the master and the slave, by using snoop, but I want to monitor the transmission. Is there a temporary file that I can see being created? It's Nexenta OS on both master and slave.


title: How to set the process won't be terminated when the terminal stops

text: [Edit] Make it simple. I invoked `java xxx...` on Machine A using putty to connect from Machine B. However I cannot reach Machine B. How can I connect Machine A from Machine C to set the running process `java xxx...` could not be terminated when Machine B shuts down? [Original] I'm connecting to a server(Machine A) using putty, and I'm running a process on it. However I have to reboot my computer(Machine B), which could terminate the connection as well as putty. Because I didn't set nohup on the process which I'm running, this could be terminated. I cannot use putty to set `disown` for some reasons. So I want to use Machine C to open putty to connect to the server(Machine A) and set the process I'm running that it won't be terminated when I reboot Machine B. Is there any way to do this? I know I can use `disown` if I'm using the same shell process. But now is not this case.


title: How do I convert FLAC files to AAC (preferrably VBR 320k+)?

text: I back my CDs up to FLAC and then transcode to AAC (.m4a) files for portability on my android phone and the wife's iPhone. I had been using XLD on Mac and it does a great job but I'd rather not steal her Mac to do this and be able to do it on my own Debian box. The following works:               avconv -i "inputfile.flac" -acodec aac -strict experimental "outputfile.m4a" -map_metadata "inputfile.flac":"outputfile.m4a"      But the following doesn't (well it does, but ignores the 320 for audio quality and results as the same as above):               avconv -i "inputfile.flac" -acodec aac -aq 320 -strict experimental "outputfile.m4a" -map_metadata "inputfile.flac":"outputfile.m4a"      I'd found other commands online such as "ffmpeg" but apparently most or all of them are depreciated in favour of the avconv method above. Any help would be greatly appreciated! I could live with 320 Kbps if not true VBR, but LC VBR of at least 320 would be best.


title: Deleted the authorized_keys file and got into a problem

text: I was trying to send files from machine A to machine B. For that, I created a public-private key pair using `ssh-keygen -t rsa` in machine A. Then I sent the `id_rsa.pub` file to machine B and I added that to the `authorized_keys` file there. It was working fine while sending from machine A to B, I was not being prompted for the password. While doing some other experiments with this I accidently deleted the `authorized_keys` file. Now again when I started the above procedure its not working. How to recover that? I am also interested to know is it possible to send files both ways round without being prompted for password?


title: Sudo email notification setup error

text: I'm Using Centos version:               [sysadmin@backup-srv ~]$ cat /etc/redhat-release      CentOS release 6.4 (Final)      I'm using this sudo version:               [sysadmin@backup-srv ~]$ sudo -V     Sudo version 1.8.6p3     Sudoers policy plugin version 1.8.6p3     Sudoers file grammar version 42     Sudoers I/O plugin version 1.8.6p3      I tried to setup notification mail for sudo, added this entry in bottom of sudo file using command visudo, but I am getting the following syntax error:               Defaults    mailto "babin@xxxxxxxxx.com"     Defaults    mailfrom "root@media.xxxxxxxxxxx.com     Defaults    mail_always on     Defaults    mailsub “*** Command run via sudo on %h ***”     Defaults    mail_badpass on     Defaults    badpass_message "Please Provide Correct Password"     Defaults    !lecture,tty_tickets,!fqdn,!syslog     Defaults    logfile=/var/log/sudo.log      This is the error I get while saving the sudo config file:                121 Defaults        mailto "babin@xxxxxxxxx.com"      122 Defaults        mailfrom "root@media.xxxxxxxxxxx.com      123 Defaults        mail_always on      124 Defaults        mailsub “*** Command run via sudo on %h ***”      125 Defaults        mail_badpass on      126 Defaults        badpass_message "Please Provide Correct Password"      127 Defaults        !lecture,tty_tickets,!fqdn,!syslog      128 Defaults        logfile=/var/log/sudo.log      The error is:               visudo: >>> /etc/sudoers: syntax error near line 121 <<<     visudo: >>> /etc/sudoers: syntax error near line 121 <<<      What to do now? How to setup the mail notification for Sudo version 1.8.6p3?


title: Learn Linux System Programming by doing projects

text: I have only a very basic idea about linux system programming. I have not done any real projects using linux system programming. In my current company I do system admin type work, but I am more interested in Linux System Programming. I want to do some projects on my own, so that I could put those projects in my resume when I apply for jobs at another companies. Kindly tell me the whether there is any projects where I could learn more linux system programming by doing some real programming stuff. Please note that I only have experience in C programming and not in Linux System Programming. But I know very basic things about linux system programming. Thanks.


title: Keyboard (mostly) doesn't work in Wine

text: When I run any program in wine (e.g. notepad), I can use the keyboard just fine until I click the mouse. As soon as I click the mouse for any reason, the keyboard stops working entirely. I'm using default X.Org settings, and adding `\--without-xinput2` to Wine has no effect. I am using a laptop, and plugging in an external USB keyboard produces the same problem exactly. There are never any error messages that seem to relate to the keyboard, but this error message always shows up a few times. It doesn't look important, but, just in case, here it is:               fixme:event:wait_for_withdrawn_state window 0x30038/1400007 wait timed out      Here are some versions, in case any of this matters: > **Wine:** 1.3.21   >  **Kernel:** 2.6.39 (Gentoo r1)   >  **X.Org X server:** 1.10.2   >  **Window manager:** musca (0.9.24) Additionally, in some programs (e.g. StarCraft), the keyboard never even starts working. In this case, text gets entered into another program. For example, if I open it from the terminal, anything I type will appear in the terminal after I quit. I think this might be a separate issue, though, since that does not happen at all with notepad. **Update:** I just noticed that 1.3.21 is a development version of Wine, so I installed 1.2.3 instead. Disappointingly, the problem persists exactly as written.


title: Help with piped program in sendmail's /etc/aliases

text: I'm trying some sort of auto-subscription via a homegrown script. I know it can be achieved by mailing lists such as Mailman but I also want to learn at the same time on how to do it by hand. Here's the simple script:               #!/usr/bin/perl          use strict;     use warnings;          open ("RCV_MAIL", ">>/home/icasimpan/mail_received.txt") or die $!;     while(<STDIN>){        print RCV_MAIL;     }     close(RCV_MAIL);      I attached the above script in /etc/aliases using the syntax:               subscribe: | /home/icasimpan/parse-subscribe.pl      and run               $ sudo newaliases      It's still a very bare script. Just testing out if I my syntax in /etc/aliases is correct. But when I tried emailing subscribe@mydomaintests.tld, it returns something like:               Delivery failure 69      I'm using Lotus Notes so my google search directed me to this link. Apparently, something to do with the file...Not sure. The command is executable, in fact I tried making it 777 and even created the mail_received.txt in the directory just to ensure I have no file permission problem but still the same. Can anyone pitch in please? Thanks in advance.


title: S3 sleep problems -- nVidia or Intel H67 (Sandy Bridge motherboard) issue?

text: I have a new Sandy Bridge i5-2500 and Intel H67 motherboard. As the onboard video didn't work, I put in an older 8600 gts graphics card. However, the S3 suspend won't work (and I can't test without the dedicated card). I've had this experience with all other desktops (all of which have nvidia cards). Any help diagnosing what might be the problem would be appreciated. I've been trying a few s2ram parameters at en.opensuse.org/SDB:Suspend_to_RAM, but this is very time consuming and so far fruitless. Namely,   * Of course, if you have experience with a H67 or P67 motherboard, that would be most useful.   * If you have owned Intel desktop motherboards, how often does S3 work?   * same with nVidia graphics cards   * Does the power supply ever make a difference?


title: Task manager keyboard shortcut in Linux?

text: Is there any keyboard shortcut for the "task manager" (like `Alt`+`Ctrl`+`Del` in windows) when my machine goes into a crashed state?


title: Shell Script - syntax error near unexpected token `else'

text: With the following shell script, why I am getting errors               syntax error near unexpected token `else'      Shell Script               echo "please enter username"     read user_name     echo "please enter password"     read -s pass     echo ${ORACLE_SID}     SID=${ORACLE_SID}     if ["${ORACLE_SID}" != 'Test'] then     sqlplus -s -l $USER_NAME/$PASS@$SID <<EOF     copy from scott/tiger@orcl insert EMP using select * from EMP     exit     EOF     else     echo "Cannot copy"     fi


title: Moving /etc to separate partition

text: How to put `/etc` on separate partition? Obviously i can't do that by editing `/etc/fstab` like i did with `/home`, because... it's in `/etc`. I want `/etc` and `/home` on one partition (sda7), and the rest on the other (sda6). I guess `/etc` must be symlink to `/mnt/part2/etc` (`/mnt/part2` being mount point of sda7), and same with `/home`. But how to tell the system to mount part2 without access to `fstab`? I'm using Arch Linux x64, if that helps.


title: reading cifs share fails with permission denied - cifs samba directory permission denied

text: I'm trying to setup a samba server to share data among clients via cifs. As a test, I mounted the samba share on the same machine and tried to access the contents of the directory. The mount command was:               mount -t cifs -o username=sthomaso,workgroup=WORKGROUP //server/scratch /mnt/server/scratch      ...which worked fine after entering the password. Although I can `cd /mnt/server/scratch`, when I try to list the contents of the directory with `ls`, I get error `ls: reading directory .: Permission denied`. On the server, my `/etc/samba/smb.conf` is:               [global]         security = user         workgroup = WORKGROUP          [homes]         writeable = yes          [scratch]         path = /var/scratch         valid users = @feausers         writeable = yes      User "sthomaso" was added to tdbsam with command:               pdbedit -a -u sthomaso      User "sthomaso" is in group "feausers", verified with the "groups sthomaso" command. `/bin/ls -lF /var | grep scratch` shows:               drwxrwx--T. 2 root feausers 4096 Jun 14 14:40 scratch/      `/var/log/samba/log.smbd` contains validation of a successful connection in line:               <snip> smbd/service.c:1070(make_connection_snum)     <snip> connect to service scratch initially as user sthomaso (uid=500, gid=501) (pid 99999)      So it looks like I am successfully mounting the share, but why can't I read the directory and access the files?


title: wireless problem

text: I just installed Ubuntu 10.10 to make my dell inspiron 1564 <64bit> dual boot. But I can't access wi-fi. I guess, I need to download drivers for wireless. My system details are:               raman@ubuntu:~$ sudo lshw -C network       *-network                           description: Network controller            product: BCM4312 802.11b/g LP-PHY            vendor: Broadcom Corporation            physical id: 0            bus info: pci@0000:04:00.0            version: 01            width: 64 bits            clock: 33MHz            capabilities: pm msi pciexpress bus_master cap_list            configuration: driver=b43-pci-bridge latency=0            resources: irq:17 memory:f0200000-f0203fff       *-network            description: Ethernet interface            product: RTL8101E/RTL8102E PCI Express Fast Ethernet controller            vendor: Realtek Semiconductor Co., Ltd.            physical id: 0            bus info: pci@0000:05:00.0            logical name: eth0            version: 02            serial: 00:26:b9:21:a7:41            size: 10MB/s            capacity: 100MB/s            width: 64 bits            clock: 33MHz            capabilities: pm msi pciexpress msix vpd bus_master cap_list rom ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd autonegotiation            configuration: autonegotiation=on broadcast=yes driver=r8169 driverversion=2.3LK-NAPI duplex=half latency=0 link=no multicast=yes port=MII speed=10MB/s            resources: irq:45 ioport:3000(size=256) memory:f0410000-f0410fff memory:f0400000-f040ffff memory:f0420000-f043ffff       *-network DISABLED            description: Wireless interface            physical id: 4            logical name: wlan0            serial: c4:17:fe:d5:ec:ca            capabilities: ethernet physical wireless            configuration: broadcast=yes driver=b43 driverversion=2.6.35-22-generic firmware=N/A link=yes multicast=yes wireless=IEEE 802.11bg               raman@ubuntu:~$ iwconfig     lo        no wireless extensions.          eth0      no wireless extensions.          wlan0     IEEE 802.11bg  ESSID:off/any                 Mode:Managed  Access Point: Not-Associated   Tx-Power=0 dBm                  Retry  long limit:7   RTS thr:off   Fragment thr:off               Power Management:off               raman@ubuntu:~$ ifconfig     eth0      Link encap:Ethernet  HWaddr 00:26:b9:21:a7:41                 UP BROADCAST MULTICAST  MTU:1500  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:1000                RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)               Interrupt:45 Base address:0xe000           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:265 errors:0 dropped:0 overruns:0 frame:0               TX packets:265 errors:0 dropped:0 overruns:0 carrier:0               collisions:0 txqueuelen:0                RX bytes:22358 (22.3 KB)  TX bytes:22358 (22.3 KB)      Any suggestions?


title: Add lines to the beginning and end of the huge file

text: I have the scenario where lines to be added on begining and end of the huge files. I have tried as shown below.   * for the first line:               sed -i '1i\'"$FirstLine" $Filename        * for the last line:               sed -i '$ a\'"$Lastline" $Filename        But the issue with this command is that it is appending the first line of the file and traversing entire file. For the last line it's again traversing the entire file and appending a last line. Since its very huge file (14GB) this is taking very long time. How can I add a line to the beginning and another to the end of a file while only reading the file once?


title: Delete old files but keep one each week/month/year

text: I have a folder with log-files each ~10 minutes:               alfred_140810-190001.json     alfred_140810-191001.json     alfred_140810-192002.json     alfred_140810-193001.json     alfred_140810-194001.json     alfred_140810-195001.json     alfred_140810-200002.json     alfred_140810-201119.json     alfred_140810-202002.json     ...      How do I achieve this?   * delete all files older than a week but keep one per week   * delete all files older than a month but keep one per month   * delete all files older than a year but keep one per year So I want one file for the last four weeks (4 files) one file per month (12 Files) and one per year (the same system like `rsnapshot` is sorting his backups).


title: What is "Ext'd (LBA)" in fdisk output?

text: This is my partition table. Output of fdisk -l                  Device Boot      Start         End      Blocks   Id  System     /dev/sda1   *          63   204796619   102398278+   7  HPFS/NTFS/exFAT     /dev/sda2       204796681   488375999   141789659+   f  W95 Ext'd (LBA)     /dev/sda5       204796683   337911209    66557263+  83  Linux     /dev/sda6       337911273   488375999    75232363+   7  HPFS/NTFS/exFAT      Can you help me understand the partition table especially /dev/sda2 which shows Ext'd (LBA).


title: Delete repeated words between brackets inline

text: Our input looks something like               2012-04-17  [GBPGBP]     2012-04-13  [GBP GBP]     2012-04-13  [GBP]     2012-04-11  [GBPGBP]     2012-04-11  [GBP GBP]     2012-04-10  [GBPGBP]     2012-04-06  [GBP GBP GBP]     2012-04-17  [GBPGBP]     2012-04-13  [GBP CDN]     2012-04-13  [GBP]     2012-04-11  [GBPCDN]     2012-04-11  [GBP DL DL]     2012-04-10  [PSGBP]     2012-04-06  [PS PS]      And we'd like to get output like               2012-04-17  [GBP]     2012-04-13  [GBP]     2012-04-13  [GBP]     2012-04-11  [GBP]     2012-04-11  [GBP]     2012-04-10  [GBP]     2012-04-06  [GBP]     2012-04-17  [GBP]     2012-04-13  [GBP CDN]     2012-04-13  [GBP]     2012-04-11  [GBPCDN]     2012-04-11  [GBP DL]     2012-04-10  [PSGBP]     2012-04-06  [PS]      Basically delete any repeated string within the brackets. Any suggestions?


title: Spell check fails in LibreOffice Word 4.1.2.3 in Linux Mint 16 Petra

text: I am using LibreOffce 4.1.2.3 in Linux Mint 16 Petra. When I try to run a spell check, no checking occurs, and I immediately get this response: ![spell check error](http://i.stack.imgur.com/rxqnd.png) It seems to indicate my language and location aren't set, so I have tried to ensure my language is set to Canadian English: ![setting language](http://i.stack.imgur.com/Tq8fy.png) I've also double checked in the preferences: ![language preferences](http://i.stack.imgur.com/gTypk.png) Nothing I have done has had any effect. How do I get the spell checker to work?


title: How do you use output redirection in combination with here-documents and cat?

text: Let's say I have a script that I want to pipe to another command or redirect to a file (piping to `sh` for the examples). Assume that I'm using bash. I could do it using `echo`:               echo "touch somefile     echo foo > somefile" | sh      I could also do almost the same thing using `cat`:               cat << EOF     touch somefile     echo foo > somefile     EOF      But if I replace "EOF" with "EOF | sh" it just thinks that it's a part of the heredoc. How can I make it so that `cat` outputs text from stdin, and then pipes it to an arbitrary location?


title: init 0 process is not starting

text: Yesterday I have encountered one problem, when I turn on my PC it took a long time to boot. After booting it reached to `command line` with `<initramfs>` (It is unknown to me what it is) I thought it is some asking for `GUI` so I typed `exit` and `ENTER`. Here it comes a big issue now, It displayed one message > Attempted to kill process `init0`(and some more) After that it displayed stack trace where some kernel messages printed (I am not able to copy all those messages). It seems like a problem to me so I just `restarted` my PC. Now my PC is not booting at all. Can someone please help me to fix this and explain me what I have done wrong?


title: Linux Boost compilation

text: I compiled boost by this method on Windows:               Go to the directory tools/build/v2/.     Run bootstrap.sh     Run b2 install --prefix=PREFIX where PREFIX is the directory where you want Boost.Build to be installed     Add PREFIX/bin to your PATH environment variable.      And It was working. Now I am trying this on Linux and it does not. I have the following situation:               kron@kron:~/Software/Sources/boost_1_49_0/tools/build/v2$ ./bootstrap.sh      bash: ./bootstrap.sh: /bin/sh^M: bad interpreter: No such file or directory     kron@kron:~/Software/Sources/boost_1_49_0/tools/build/v2$ sh bootstrap.sh      : not foundh: 8:      : not foundh: 10:      : not foundh: 14:      bootstrap.sh: 15: Syntax error: Bad for loop variable     kron@kron:~/Software/Sources/boost_1_49_0/tools/build/v2$ ls -l     total 224     -rw-r--r--  1 kron kron   271 Nov  5  2006 boost-build.jam     -rw-r--r--  1 kron kron  7437 Nov  9  2008 boost_build.png     -rw-r--r--  1 kron kron  7169 Jan 14  2009 boost_build.svg     -rw-r--r--  1 kron kron   842 Nov  5  2006 boost.css     -rw-r--r--  1 kron kron  1088 Jun  6  2011 bootstrap.bat     -rw-r--r--  1 kron kron   778 Oct 29  2003 bootstrap.jam     -rwxr-xr-x  1 kron kron  2737 Jun  6  2011 bootstrap.sh     drwx------  2 kron kron  4096 Feb 22 18:28 build     -rw-r--r--  1 kron kron 36462 Jun  6  2011 build-system.jam


title: Moving Data From Old System to New System via NFS Mount

text: My old system was running RHEL 5,(systemold.blah.blah), and I wanted to update the server with as little downtime as possible, so I built out a new system (systemnew.blah.blah) and put RHEL 6 on it. Now I want to transfer the data from the old system to the new system using NFS Mount, or the IP address. Which would be better, and how would I go about performing the data transfer? Thanks!


title: How can I configure Fedora to support scrolling with my ThinkPad TrackPoint?

text: On Ubuntu (and Windows), I'm able to scroll by using the trackpoint and the middle button. How can I configure Fedora 16 to allow me to scroll with that? In Ubuntu, it just worked out of the box - I didn't have to configure anything. xinput list shows the following:               [jrg@atlantis ~]$ xinput list     ⎡ Virtual core pointer                      id=2    [master pointer  (3)]     ⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]     ⎜   ↳ SynPS/2 Synaptics TouchPad                id=10   [slave  pointer  (2)]     ⎜   ↳ TPPS/2 IBM TrackPoint                     id=11   [slave  pointer  (2)]     ⎣ Virtual core keyboard                     id=3    [master keyboard (2)]         ↳ Virtual core XTEST keyboard               id=5    [slave  keyboard (3)]         ↳ Power Button                              id=6    [slave  keyboard (3)]         ↳ Video Bus                                 id=7    [slave  keyboard (3)]         ↳ Sleep Button                              id=8    [slave  keyboard (3)]         ↳ AT Translated Set 2 keyboard              id=9    [slave  keyboard (3)]         ↳ ThinkPad Extra Buttons                    id=12   [slave  keyboard (3)]


title: Understanding Unix file name encoding

text: I have a hard time understanding how the file name encoding works. On unix.SE I find contradicting explanations. ## File names are stored as characters To quote another answer: Several questions about file-system character encoding on linux > […] as you mention in your question, a UNIX file name is just a sequence of > characters; the kernel knows nothing about the encoding, which entirely a > user-space (i.e., application-level) concept. If file names are stored as characters, there has to be some kind of encoding involved, since finally the file name has to end up as a bit or byte sequence on the disk. If the user can choose _any_ encoding to map the characters to a byte sequence that is fed to the kernel, it is possible to create _any_ byte sequence for a valid file name. Assume the following: A user uses a random encoding **X** , which translates the file `foo` into the byte sequence **α** and saves it to disk. Another user uses encoding **Y**. In this encoding **α** translates to `/`, which is not allowed as a file name. However, for the first user the file is valid. I assume that this scenario cannot happen. ## File names are stored as binary blobs To quote another answer: What charset encoding is used for filenames and paths on Linux? > As noted by others, there isn't really an answer to this: filenames and > paths do not have an encoding; the OS only deals with sequence of bytes. > Individual applications may choose to interpret them as being encoded in > some way, but this varies. If the system does not deal with characters, how can particular characters (e.g. `/` or `NULL`) be forbidden in file names? There no notion of a `/` without an encoding. An explanation would be that file system can store file names containing _any_ character and it's only the user programs that take an encoding into account that would choke on file names containing invalid characters. That, in turn, means that file systems and the kernel can, without any difficulty, handle file names containing a `/`. I also assume that this is wrong. **Where does the encoding take place and where is the restriction posed of not allowing particular characters?**


title: Shell scripts Linux -> Solaris conversion guide

text: I've developed a few Bash scripts on a LFS system which should now be made to work on a minimal installation of Sun Solaris 10. Is there a guide somewhere with at least some **general tips** for conversion, and even better, a " **conversion table** " for common commands and options? This answer would be a good example of a single entry in such a table.


title: Integrating custom kernel module into Debian

text: I've built a kernal module from source and now would like to load the module at boot. The .ko file is in the build directory in my user folder, and I know it works because running `insmod ./vizzini.ko` from the appropriate place works fine. I made the directory `vizzini` in `/lib/modules/2.6.32-5-amd64/kernel/drivers/` and copied the .ko file there. Then I added `vizzini` to the end of `/etc/modules`. However, when I run `modprobe vizzini`, the module is not recognised.   * Do I need to restart my computer (log out, log in again?)   * Can I use any name for the folder containing the .ko file?   * What permissions do I need?    * Is what I've done right so far?   * What else do I need to do? Permissions are currently `-rw-r--r-- root root`


title: process continous output of synclient

text: I am using synclient to track the position of finger on the touchpad. I use the following command.               synclient -m 100 | awk '{print $2,$3}'      This command gives the 'x' and 'y' co-ordinate on the touch-pad.   What I want is, to give these co-ordinates to program which will draw these points. As soon as new point is tracked, it should be drawn. But my problem is, since the command generate the output continuously and it has not yet finished, I don't know how to pass the continuous generating output of a command. How to achieve this?      (What I have achieved is the following:               timeout 5 synclient -m 100 > pattern       So after 5 seconds, 'pattern' file has all the information, I extract the co- ordinates from the file and the draw the lines. But I don't want to do this.)


title: debian cannot install kernel source

text: I want to use debian linux for my laptop again. So I took my old debian 6.0 cds and installed it.   From the last time I know, that I have to build the driver for my Atheros AR8151 Gigabit Ethernet Controller.   It seems that this time I installed less base packets.   I had to install make and gcc (apt-get install build-essential).   Now I want to build the driver. When I go to the src folder and type make install, I read               Linux kernel source not found      So I googled, found some answers and typed               apt-get install kernel-source-2.6.32-5-amd64      with the following message               paket could not be found      The directory `/usr/src` is empty.


title: Copy files with renaming

text: I have a huge file tree. Some files have same name but in different case, e.g. 'some_code.c' and 'Some_Code.c'. So when I'm trying to copy it to NTFS/FAT filesystem it asks me about whether i'm gonna replace it or skip. Don't you know is there any way to automaticly rename such files, for example, by adding '(1)' to the name of conflict file (like windows 7 does)?


title: Increasing Accuracy of Synaptics Touchpad - Arch Linux

text: Here's my current problem with my Arch Linux installation. The touchpad is _horribly_ inaccurate. And by that, I mean, I cannot click links without having to sway back and forth. I've been resorting to using my keyboard for small clicking actions. I was previously on Mint, and the touchpad was much more accurate, if not as accurate as Windows' touchpad drivers are. I was able to hold my finger on the touchpad and it wouldn't jitter around, and I was able to select text where I wanted to. So my all in all question is, is there at all a way to increase the accuracy of the mouse?


http://www.geekzone.co.nz/foobar/6229      How can I fully disable the .desktop file function under GNOME?


title: How can I get a package manager on a Samsung Chromebook?

text: I have enabled developer mode, and I can access the shell, but I don't have the emerge command, I remember reading that ChromeOS is built on Gentoo. How can I get a package manager on ChromeOS?


title: Where can I see the last mount time?

text: E.g: I need to know when was the last time a pendrive was mounted. Where could I see that? The pendrive has e.g.: FAT32, EXT3 filesystem.


title: mozilla sync server and mysql auth

text: Recently I updated my debian squeeze to wheezy. Unfortunately my firefox sync server (weave) stopped working. I saved the config files and downloaded the new version via hg. I already fixed some errors but I'm not able to solve the last problem. My sync.conf:      `[storage]   backend = syncstorage.storage.sql.SQLStorage   sqluri = mysql://user:password@localhost:port/user   standard_collections = false   use_quota = true   quota_size = 50120   pool_size = 100   pool_recycle = 3600   create_tables = true   [auth]   backend = services.user.sql.SQLUser   sqluri = mysql://user:password@localhost:port/user   pool_size = 100   pool_recycle = 3600   create_tables = true   [nodes]   fallback_node = https://domain.com/sync/   [captcha]   use = true   public_key = thekey   private_key = thekey   use_ssl = true   [smtp]   host = localhost   port = 25   sender = weave@domain.com   [cef]   use = true   file = syslog   vendor = mozilla   version = 0   device_version = 1.3   product = weave   [reset_codes]   backend = services.resetcodes.rc_sql.ResetCodeSQL   sqluri = mysql://user:password@localhost:port/user   create_tables = true` My apache2 configuration:      `WSGIDaemonProcess sync user=ffsync group=ffsync processes=2 threads=25   WSGIScriptAlias /sync /opt/moz-sync-server/sync.wsgi   WSGIPassAuthorization On   WSGIProcessGroup sync` The server starts with `bin/paste serve development.ini` without errors, but via mod_wsgi the following messages are in error.log:      `[Thu Aug 22 13:05:29 2013] [error] [client ip-address] File "/opt/moz-sync- server/deps/server-core/services/pluginreg.py", line 108, in load_and_configure   [Thu Aug 22 13:05:29 2013] [error] [client ip-address] backend_name = params[cls_param]   [Thu Aug 22 13:05:29 2013] [error] [client ip-address] KeyError: 'backend'` The sync server is very important because I have lots of bookmarks.


title: How to only allow exact package updates from a repository?

text: If I have:               [usern@hostn yum.repos.d]$ cat google-chrome.repo      [google-chrome]     name=google-chrome     baseurl=http://dl.google.com/linux/chrome/rpm/stable/i386     enabled=1     gpgcheck=1      ...how can I ensure that there will not be incidents like (just theory): a firefox package comes out in the google chrome repo, and because (just theory again) it has a newer version then the one that's in the original repos it gets installed when updating? How could I ensure that that from the google- chrome-repos I only get the google-chrome package?


title: Package managers Update versus Upgrade?

text: `sudo zypper update`               The following package updates will NOT be installed:       amarok bluedevil choqok cln digikam digikam-lang GeoIP gstreamer-0_10 gstreamer-0_10-plugin-gnomevfs gstreamer-0_10-plugin-hal        gstreamer-0_10-plugins-base gstreamer-0_10-plugins-good gstreamer-0_10-plugins-good-lang k3b kaffeine kipi-plugins kipi-plugins-acquireimage        ksshaskpass ktorrent ktorrent-lang liba52-0 libavcodec52 libavformat52 libavutil50 libbluedevil1 libcares2 libGeoIP1 libgstapp-0_10-0        libgstinterfaces-0_10-0 libgstreamer-0_10-0 libgstreamer-0_10-0-32bit libidn libidn-32bit libktorrent3 libktorrent3-lang liblash1 liblzma5 libnetcdf4        libshout3 libssh2-1 libswscale0 libtag-extras1 libupnp6 libva1 libvlc5 libwavpack1 libx264-115 libxine1 libxine1-gnome-vfs libxine1-pulse linphone            mjpegtools netcdf NetworkManager-kde4-libs NetworkManager-openvpn-kde4 NetworkManager-pptp-kde4 NetworkManager-vpnc-kde4 openmpi oxygen-gtk        python-cairo python-gobject python-gobject-cairo python-gtk python-numpy python-qt4 python-simplejson python-sip shared-desktop-ontologies skanlite        sox taglib xz           The following packages are going to be upgraded:       dbus-1 dbus-1-32bit dbus-1-devel google-chrome-stable gstreamer-0_10-buzztard libgstapp-0_10-0-32bit libvlc5 libvlccore4 libx264-116 libxine1-codecs        python-virtualbox virtualbox virtualbox-devel virtualbox-host-kmp-default virtualbox-qt vlc vlc-aout-pulse vlc-gnome vlc-noX vlc-qt       First off, why is zypper telling me about updates I need, then saying they won't be installed? Also, below it says `...packages will be UPGRADED`. Is there a difference between those terms? I ask because zypper accepts both `update` and `upgrade` flags.


title: How can one time out a root shell after a certain period of time?

text: Is there a way to 'time out' a root shell (for example, in `gnome-terminal`) so that after a certain amount of time not issuing any commands, the shell exits? I'm searching for a solution that works in `bash` on Fedora, and in `ksh` on OpenBSD.


title: How secure is Ubuntu in Virtualbox on Windows host?

text: I have the most recent version of Ubuntu in Virtualbox on Windows 7 host. How secure will that be? I mean if I get malware on windows how will that affect the Ubuntu system I am working on?


title: In Gnome file browser, fall back to the parent directory when a directory is deleted

text: I am using CentOS Release 6.4(Final), with Kernel Linux 2.6.32-358.11.1.el6.x86_64, and GNOME 2.82.2. I have enabled “Always open in browser” option in the File management preferences. I have a script running that prints the log in a directory. If the script processing is successful, the script also deletes the logs and their directory. The logs and the directory are not deleted if script processing fails. Now when I have opened the log directory and the script terminates successfully (so the directory is deleted), the whole browser is closed (along with all tabs it have!) rather than falling back to the parent directory (expected behavior). Is there any setting that will prevent the Gnome file browser from closing and make it fall back to its parent directory?


title: How to print multiple pages per side with one(right) page blank?

text: Input file is any pdf document. I want to have right side space for writing notes. output.pdf looks like ![enter image description here](http://i.stack.imgur.com/Mjdfu.png)!


title: Setting up Bind9 - lsb-base not in sources

text: I've been having real trouble installing Bind9 following this tutorial http://forums.debian.net/viewtopic.php?f=16&t=39146 When I get to entering these commands:               apt-get -y build-dep lsb-base     apt-get source lsb-base -b      I constantly get the error "E: You must put some 'source' URIs in your sources.list"   I am sure that I need to add a lsb-base source to my sources.list but I don't know what the link will be and the attributes. I am running Debian Wheezy.


title: Setting the minimum pointer speed with no usable GNOME GUI

text: I use Debian Squeeze x86-64 (Kernel 3.2) with gdm3 and GNOME on a 2010 MacBook Pro. Recently, as I tried changing the pointer configuration, I accidentally set the minimum speed of the pointer to 0 using the "Gpointing device settings" program. Now my GNOME desktop is completely unusable because the pointer will not move. I am sure that a configuration file with the pointer settings is somewhere in /etc, but editing the xorg.conf file is not an option because it does not exist on my system. Where is this configuration file located or is there a way to circumvent default pointing-device settings?


title: How to set a background image for urxvt?

text: How do I set a tiled background image in urxvt? I have tried the following alternatives in my `.Xresources` file:               URxvt*backgroundPixmap: /home/jgg/Pictures/tiles/escheresque_ste.png;style=tiled          URxvt.backgroundPixmap: /home/jgg/Pictures/tiles/escheresque_ste.xpm          URxvt.backgroundPixmap: /home/jgg/Pictures/tiles/escheresque_ste.png;+0+0:tile -tr      I also ran `xrdb -merge ~/.Xresources` to ensure that the configuration is updated every time. What am I missing? Is there a library I need to install? I'm running rxvt-unicode (urxvt) v9.15 on a Debian 7.4 (Wheezy) system.


title: Linux slows down after long uptime

text: Occasionally I leave my openSUSE 13.1 64-bit system KDE-based up for a few days or even a week without a reboot. However, I notice after a night of idle standby the system gets very slow when I want to use it the next morning. So far I have been trying to free the page cache, dentries, inodes by running               echo 3 > /proc/sys/vm/drop_caches      This helps only partially. Can you recommend other ways to analyse and cure the cause of system slowness?


title: Using Pipeline to Direct Files to Program that Opens Them

text: I have a `Music` folder, in which I have some music tracks, which aren't organized too well. Thus, if I want to find a particular track, I usually type: `ls Music | grep <keyword>`, where `<keyword>` is some keyword I expect the filename to have. Then my command line will return the name of the file for which I am looking, `<name>`, and then to open the music file, I will type `vlc <name> &`. My question is whether it would be possible to streamline all of this into one operation? I tried using `ls Music | grep <keyword> | vlc`, but this was unsuccessful. How would I go about doing this? (More generally, how would I use the pipeline for this sort of purpose?)


title: File in which the data structure for Global Descriptor and Local Descriptor table is defined?

text: I am a newbie. I am reading Understanding Linux Kernel, and in it I read about the Global Descriptor table and the Local Descriptor Table. I am just curious to know, in which source file(s)(of linux kernel) the data structure for GDT and LDT are defined?


title: iptux Installation causing error

text: I'm trying to install iptux in CentOS by using               yum install ip*      it causes the following error               --> Finished Dependency Resolution     Error: samba4-winbind conflicts with samba-winbind-3.6.9-167.el6_5.x86_64     Error: samba4-common conflicts with samba-common-3.6.9-167.el6_5.x86_64      You could try using --skip-broken to work around the problem     ** Found 1 pre-existing rpmdb problem(s), 'yum check' output follows:     libstdc++6-gcc47-32bit-4.7.3_20130411-5.4.x86_64 has installed conflicts libstdc++6-32bit: libstdc++6-gcc47-32bit-4.7.3_20130411-5.4.x86_64      How can this error be resolved?


title: Change a Password is not successfull on ubuntu 12.04

text: i am trying to set a new password for linux Ubuntu 12.04,but on running command   its giving something like this               $passwd     Changing password for ubuntu.     (current) UNIX password:      Enter new UNIX password:      Retype new UNIX password:      Bad: new password is too simple     Enter new UNIX password:       i really don't understand why this is so....?


title: How can I check my kernel preemption configuration?

text: I want to check if my Linux kernel is preemptive or non-preemptive. How can I check this using a command, something such as `uname -a`?


title: Allow paswordless user to change to another passwordless user

text: I have two users `dev` and `tomcat` neither of them have a password. How can I allow `dev` **1** do `su - tomcat` without having him having to enter any credentials? **1** connects with ssh keyfile


title: Execute command on shared account login

text: At work our team uses a shared account "appadmin" to administer our application. At login, each one of us sources an "aliasrc" file containing his or her preferences. (aliases, display, prompt, ...). So far I do something like this:               normaluser$ su - appadmin     password:     appadmin$ . ~normaluser/.aliasrc     [superprompt: appadmin@machine]$       I am looking to reduce all this to a single command. So far I have replaced the use of `su` by `rlogin` in order to take advantage of `.rhosts` and avoid having to input the password each time. (I know ssh is secure, but rlogin seems to be the standard around here). Is there a way to source my aliasrc file as soon as I login in the shared account? I don't insist on using `rlogin`. If you have something better to suggest I am all ears (... well eyes :-/ ). Hope I am clear enough. _**Technical environment** : Solaris 10, Ksh._


title: Multiple Mysql databases backup tool?

text: My OS is Ubuntu 10.10. I have several small sites (all on various shared hosts) and I'm thinking that it'd be probably good idea to regularly backup mysql databases from these remote shared hosts. I currently do it manually and it seem to be while not laborious but definitely boring process (phpmyadmin). :) How would you guys go about it (no shh access available)? If do it like this:               mysqldump -u root -p[root_password] [database_name] -h mysql_host > dumpfilename.sql      Does that mean that password is being transferred in plain text?


title: I would like to put one single icon in the Desktop that actually opens the Desktop. Any ideas?

text: The idea is to turn my Desktop into a place where I can put a image reference of what I am learning at the moment. This would be an example This means:   * puttig an image of the reference of what I'm learning as a background of the Desktop (already possible)   * having the icons of files, folders or even removable USB pens available (one click away) but without blocking te view to that background Any Ideas? Or alternative solutions?


title: Redirect linux serial console

text: I want to redirect my serial port while telnet session in linux. I have an embedded Linux box which is has a serial console. After I do a telnet to the box, I can type in both the serial console as well as the telnet console. I want to stop the serial console access or redirect it to something else. After I exit from the telnet console, I should be able to access the serial console again. Can any one suggest, please? I have planned to put `cat /dev/console > /dev/ttyp0` when telnet session starts. It solves the problem of not accessing the serial console when telnet session console is open, but when I exit from the telnet console and type something on the serial console, for the shell command `-/bin/sh: command not found` (Shell not running perhaps?). Thanks.


title: brcmsmac does not work

text: I am attempting to enable my wireless interface in **Slax Linux** , so far, I know the driver I need is `brcmsmac`, since I have a broadcom card; and this work in **Slackware**. The driver is available and does not show any errors when I load it with: `# modprobe brcmsmac` But no new interface is loaded. ` Here is I've tried:               # lspci | grep Network          03:00.0 Network controller: Broadcom Corporation BCM4313 802.11b/g/n Wireless LAN Controller (rev 01)          # ifconfig -a          eth0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500             ether e8:11:32:5f:ff:5e  txqueuelen 1000  (Ethernet)             RX packets 0  bytes 0 (0.0 B)             RX errors 0  dropped 0  overruns 0  frame 0             TX packets 0  bytes 0 (0.0 B)             TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0             device interrupt 41  base 0xc000            lo: flags=8<LOOPBACK>  mtu 16436             loop  txqueuelen 0  (Local Loopback)             RX packets 0  bytes 0 (0.0 B)             RX errors 0  dropped 0  overruns 0  frame 0             TX packets 0  bytes 0 (0.0 B)             TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0      ` Any suggestions? I am sorry @slm, here's dmesg output ` # dmesg | grep brcmsmac               brcmsmac bcma0:0: mfg 4bf core 812 rev 24 class 0 irq 16     ieee80211 phy0: brcmsmac: fail to load firmware brcm/bcm43xx-0.fw     ieee80211 phy0: brcmsmac: Failed to find firmware usually in /lib/firmware/brcm     brcmsmac: brcms_bcma_probe: brcms_attach failed!      ` I hope this help!


title: Why are wc -m and wc -c different?

text: As a C programmer, I was surprised to see that `wc -c` (which count the number of bytes), and `wc -m` (which counts the number of characters) output very different results for a long, text file of mine. I had always been told that `sizeof(char)` is 1 byte.               qdii@nomada ~/Documents $ wc -c sentences.csv     102990983 sentences.csv     qdii@nomada ~/Documents $ wc -m sentences.csv     89023123 sentences.csv      Any explanation?


title: Troubleshooting Anacron

text: As a newbie, I'm running into a few problems in using Anacron. The code I'm using was adapted from a website in the Linux Gazette and I've already had to make a couple of changes for my code to even work, but the tar commands aren't running and the other jobs (I did a force) are failing because there's nothing to get them started. I'm also running into an issue where anacron doesn't seem to be starting with my computer (by checking `ps -e|grep anacron`). As for that, unless I put anacron in the forefront, it doesn't seem to be giving me any options at all. I'm aware that the rsync code is off, but it's not my biggest concern right now.               # /etc/anacrontab: configuration file for anacron          # See anacron(8) and anacrontab(5) for details.          SHELL=/bin/sh     PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin               # Rsync over SSH the tarballed files below     1   5   backup  rsync -auz -e "ssh -i ~/.sshkeys/diskstation-rsync-key" /backups/* asturm@sturmundrang.diskstation.me               # Back up user-generated Linux files with snapshots of 6,4,3,2,1 months and 3,2,1 weeks - /home /etc    /var     # Order 4m->6m, 3m->4m, 2m->3m, 1m->2m, 3w->1m, 2w->3w, 1w->2w, mirror->1w          # Every 60 days (2 months)     60  20  home    cp -f /backups/home/4month.tar.gz /backups/home/6month.tar.gz     60  20  etc cp -f /backups/etc/4month.tar.gz /backups/etc/6month.tar.gz     60 20 var cp -f /backups/var/4month.tar.gz /backups/var/6month.tar.gz          # every 30 days (1 month)     30 22 home4 cp -f /backups/home/3month.tar.gz /backups/home/4month.tar.gz     30 24 home5 cp -f /backups/home/2month.tar.gz /backups/home/3month.tar.gz     30 26 home6 cp -f /backups/home/1month.tar.gz /backups/home/2month.tar.gz     30 28 home7 cp -f /backups/home/3week.tar.gz  /backups/home/1month.tar.gz          # every 30 days (1 month)     30 22 etc4 cp -f /backups/etc/3month.tar.gz /backups/etc/4month.tar.gz     30 24 etc5 cp -f /backups/etc/2month.tar.gz /backups/etc/3month.tar.gz     30 26 etc6 cp -f /backups/etc/1month.tar.gz /backups/etc/2month.tar.gz     30 28 etc7 cp -f /backups/etc/3week.tar.gz  /backups/etc/1month.tar.gz          # every 30 days (1 month)     30 22 var4 cp -f /backups/var/3month.tar.gz /backups/var/4month.tar.gz     30 24 var5 cp -f /backups/var/2month.tar.gz /backups/var/3month.tar.gz     30 26 var6 cp -f /backups/var/1month.tar.gz /backups/var/2month.tar.gz     30 28 var7 cp -f /backups/var/3week.tar.gz  /backups/var/1month.tar.gz          # And every 7 days - pass everything up and remove the week 1 backup.     7 30 home1 cp -f /backups/home/2week.tar.gz  /backups/home/3week.tar.gz     7 32 home2 cp -f /backups/home/1week.tar.gz  /backups/home/2week.tar.gz      7 34 home3 rm -f /backups/home/1week.tar.gz          7 30 etc1 cp -f /backups/etc/2week.tar.gz  /backups/etc/3week.tar.gz     7 32 etc2 cp -f /backups/etc/1week.tar.gz  /backups/etc/2week.tar.gz      7 34 etc3 rm -f /backups/etc/1week.tar.gz          7 30 var1 cp -f /backups/var/2week.tar.gz  /backups/var/3week.tar.gz     7 32 var2 cp -f /backups/var/1week.tar.gz  /backups/var/2week.tar.gz      7 34 var3 rm -f /backups/var/1week.tar.gz               # Tarball these folders every week     7   36  hometar tar -zcf /backups/home/1week.tar.gz /home/*     7   36  etctar  tar -zcf /backups/etc/1week.tar.gz /etc/*     7   36  vartar  tar -zcf /backups/var/1week.tar.gz /var/*          # These replace cron's entries     1   5   cron.daily   nice run-parts --report /etc/cron.daily     7   10  cron.weekly  nice run-parts --report /etc/cron.weekly     @monthly    15  cron.monthly nice run-parts --report /etc/cron.monthly


title: fstrim trims more than half of partition size even though partition mounted with discard

text: When I installed my SSD I just mounted with `discard` and didn't sweat it. However today I was reading about the pros and cons of using `fstrim` instead and decided to run the program to get an idea of how long it would actually take (still with my partitions mounted with `discard`). The command took several minutes on both my root and home partitions. For my home partition I used `-v` and got this:               $ sudo fstrim -v /home     /home: 137494052864 bytes were trimmed      This is more than the amount of free space on the partition!               $ df -h /home     Filesystem      Size  Used Avail Use% Mounted on     /dev/sda2       206G   78G  118G  40% /home      Subsequent runs finish in less than a second, eg:               $ sudo fstrim -v /home     /home: 0 bytes were trimmed      Surely if I have always had the partition mounted with `discard`, `fstrim` should not trim a large amount of data like that? The `discard` option is definitely enabled, here are the relevant `fstab` lines:               UUID=xxxxxxxx...    /          ext4   noatime,discard,errors=remount-ro  0      1     UUID=xxxxxxxx...    /home      ext4   noatime,discard,errors=remount-ro  0      2      And `mount` output lines:               /dev/disk/by-uuid/xxxxxxxx... on / type ext4 (rw,noatime,discard,errors=remount-ro,stripe=128,data=ordered)     /dev/sda2 on /home type ext4 (rw,noatime,discard,errors=remount-ro,stripe=128,data=ordered)      The SSD is a TOSHIBA THNSNS256GMCP. Why does this happen?


title: RAID on USB stick

text: I have a USB stick that's showing some weird problems. I'd like to create a number of partitions (3?) and use RAID over those partitions to ensure resilience to failure. Is this a good idea? How do I do this in Linux?