title: Problem at booting Windows from GRUB2 menu made by Debian for itself

text: I've Asus UEFI motherboard with 2 hard disks, (hd0) and (hd1). I managed to make my Debian Wheezy on my second disk bootable using grub-efi and it boots OK. I also have Windows on the first disk, which isn't unbootable but the way I have to do it is unconvenient. The problem is that when I boot from the EFI firmware, choosing the Debian- Grub2 boot entry from the colourful menu, GRUB2 can see (using `ls` and anything else) both disks, but when I do nothing after turning PC on and just wait for the Grub menu to appear on its own (it has the highest priority among EFI menu boot entries) and then try to boot my Windows (using console or having added Grub menu entry), it just doesn't see the first disk and names the second one (hd0), so the attempt fails. My guess is that the EFI firmware somehow doesn't tell GRUB there is the first disk, maybe for speeding up. I use LVM if it matters. How to make GRUB2 see both disks?


title: What are the ways of making your own linux distro?

text: I have customized my linux to a great extent to meet my specific needs. I want to make a bootable DVD out of it, which I can install on whichever system I wish. I have heard of a tool called remastersys.   * What are the alternatives to this tool?   * What are the pros and cons of each tool?


title: zerombr and clearpart not working in RHEL7

text: I've been using the following simple partitioning scheme to setup some RedHat machines.               zerombr     clearpart --all --initlabel     bootloader --location=mbr     autopart      The unfortunate part is that I know that as of RHEL 6.3 --initlabel no longer initializes new drives and has been swapped out for the `zerombr` option. https://access.redhat.com/solutions/117513 I have both of these options included (to support legacy). But it doesn't seem like zerombr actually initializes the disks at all and when I check in the parted utility there is no disk label there and one needs to be created manually. As you can see even with the `zerombr` and `clearpart --all --initlabel` I still have partition data on my disk during kickstart               (parted) print     Model: HITACHI HUS156060VLS600 (scsi)     Disk /dev/sda: 600GB     Sector size (logical/physical): 512B/512B     Partition Table: msdos     Disk Flags:          Number  Start   End    Size   Type     File system  Flags      1      32.3kB  839MB  839MB  primary               boot      2      839MB   600GB  599GB  primary      3      600GB   600GB  609MB  primary  fat32          (parted) mklabel msdos      And it then proceeds to error out and fails to continue installation until I reboot after running a mklabel. Anyone have any ideas? Or is this possibly a bug that should be submitted to RedHat?


title: Using a here-doc for `sed` and a file

text: The title says it all, I want to use a here-doc for sed commands and provide the file to be read and the output file. I've looked at Here-Documents from Advanced Bash Scripting guide but it does not mention anything about regular arguments in using a here-doc. Is it even possible? I'd like to achieve something like the following:               #!/bin/bash     OUT=/tmp/outfile.txt     IN=/my_in_file.txt          sed $IN << SED_SCRIPT         s/a/1/g         s/test/full/g          SED_SCRIPT      > $OUT;      Any help is really appreciated.


title: A short way to call my bash script instead of use Source command

text: My script use and modifies a shell variable. I need to always use:               source myscript      Is there a shorter way to call this script and have it modify the current shell's environment? It can be elegantly done by using functions use as described in this answer, but I need a faster way.


title: raid array not mounted

text: I have configured RAID array in my SUSE machine using `mdadm` command. The `/etc/mdadm.conf` is fine and `cat /proc/mdstat` shows up the array and it is also fine. However, if I run the `df -h` command, it is not showing the raid array. Is there some step am missing?


title: Monitoring outbound server http header information?

text: What tool / function can we use on our linux server running CentOS to monitor the http headers that are sent from our application to another application on a different server? Looking for http header monitoring from server to server. My issue is I have no idea how to capture the data sent from the server, meaning the http headers sent via a post. I have tried many methods and third party software's like fiddler2 and ieinspector and the list goes on, but they only seem to capture the client headers and not what is being sent out from the server. I just need to capture the string being sent out via a post function and what is being returned. Seems simple, yet in this case, I'm beyond lost and running out of time to resolve what should be a simple solution. We can see the headers from the server to the client using fiddler2, however, our application is calling an api on a different server. So the sequence goes - client to server - server to server - server back to server - server back to client. We cannot tell if the http headers sent from our server to the other server are correct. The other server's support personnel are unable to capture that information & are forcing us to uncover the data. We know what we think we are sending, but cannot verify it. What we want is a fiddler2 like tool that resides on our server to track this, that can monitor the server to server traffic. If fiddler2 can do this, please let us know how to do this.


title: Previously resolved hostnames

text: Is it possible to find previously resolved hostnames in linux? I have a host that I can currently not resolve, but I have resolved it earlier and would like to know which ip was resolved to.


title: Permissions "problem" using SCP to copy to root owned folder from local

text: I'm taking some early forays into setting up a basic LAMP box. It's my first time setting up the software I'll use as opposed to just being handed a working environment, so go easy on me :) I have installed Apache, and the corresponding htdocs folder has permissions of drwxr-xr-x. I can copy from remote to local fine, but when trying to copy a small directory I get permission denied. I should mention I am logging in using my own admin user account on the box, and of course htdocs is not owned by me. So I figure, in my naivety that I just need to sudo the command - that didn't work. Okay, next I'll "fix" the permissions to 774 based on what I read on the web. Nope that did not work either. I am thinking "do I need to add write access to the third "user"? That seems a weird one. Then I read a forum thread where the guy was told that because the folder was root owned, he'd have to scp the files into his home/ dir on the remote host, then sudo cp them to the apache folder. Seems a longwinded method to me, but before I try and do that, I thought I'd ask here whether that is true, and whether there were any best practices here and whether any of my assumptions were wrong? Secondly - what is appropriate permissions for htdocs? I'm still in the early stages and will probably eventually setup some FTP access, but I'd would be good to know.


title: Fedora 15: something weird going on with yum

text: I am unsuccessfully trying to install some packages in Fedora 15 using `yum`. Every time I use `yum install` I get this output:               [ziga@ziga-CQ56 ~]$ sudo yum install yum-fastestmirror     [sudo] password for ziga:      Loaded plugins: langpacks, presto, refresh-packagekit     Could not retrieve mirrorlist http://ayo.freshrpms.net/fedora/linux/15/mirrors-freshrpms error was     14: HTTP Error 404 - Not Found : http://ayo.freshrpms.net/fedora/linux/15/mirrors-freshrpms     Error: Cannot retrieve repository metadata (repomd.xml) for repository:    freshrpms. Please verify its path and try again


title: IRSSI parse chat messages

text: I run IRSSI on Debian Squeeze on my WD NAS and have it connected to irc.twitch.tv and joined in multiple channels. I can go in much detail here, but I think all I have to say is that I want to have bot commands for my twitch chat. No clue on how to achieve this with IRSSI. **Where do I start?**


title: RHEL Linux 6 teamviewer 9 upgrade error

text: I had teamviewer 7 installed on my server RHEL 6, but I wanted to upgrade it. I downloaded the latest rpm teamviewer 9 en from here and upgraded it, now my server X window system won't start up. After everything has started my windows x won't start. I can login with putty, windscp en webmin, but I cannot login physically on the server. Any solutions?


title: Open source tool similar to MetadataTouch or metadata assistant?

text: I am looking for a tool that is open source and similar to metadata touch or metadata assistant. If there isn't one I may create one.


title: Convert FLAC files to OGG

text: Are there any linux tools for transcoding and syncing music directories? I encode my music to flac, which I keep on an external hard drive. Some time ago I transcoded this collection to ogg, in a different directory. Since then I have added to the flac collection. I am looking for a tool that scans my main (flac) collection and transcodes any new additions into the smaller (ogg) collection. What I have in mind is something that worked like Unison or Rsync (but was able to ignore the fact that the files are in different formats) but also transcoded during the copy process. Are there any tools that do something like this?


title: Linux Mint default physical screen before login

text: I currently have to do annoying things to log into Linux Mint 16 Petra. I have two screens:               new, left, VGA     old, right, DVI      The mouse is trapped on the left screen and the login dialogue for mdm is on the right screen. Changing the default screen/display inside the cinnamon environment does not solve this. I can't type in the password field, so I guess the keyboard input goes to the empty screen too. Is there a way to choose the default display?


title: What's up with "*-git date" packages in the AUR?

text: I'm just about to move to Arch Linux. Checking out packages in the AUR, there's a lot of packages following the naming scheme "project-name-git date", e.g:               adonthell-git 20100408-1     akonadi-facebook-git 20111117-1     wesnoth-svn 40587-1     vimprobable-git 20110829-1     vimprobable2-git 20111214-1      What are these packages? Are they just snapshots from the adonthell/wesnoth/etc repository the specified point in time? If so, it the package couldn't be updated without changing its name, which has got to complicate package management a lot. If I'd like the latest version of, say, vimprobable from the git repo, should I use AUR or compile it myself?


title: How can I get weechat to signal gnome-terminal on a highlight?

text: When using a terminal based client like weechat, weechat does not signal the terminal letting the user know that they have been highlighted. How can this be done? I would like my terminal to blink when I am highlighted.


title: Does one alias affect another alias?

text: I don't have many aliases set up in my .bash_aliases file just yet. Only recently have I discovered how useful they can be. I can see myself getting quite hooked on aliases so before the file gets too unwieldy I'd like to clarify something by asking a very simple question. Does one alias affect another, or does the alias always revert back to the original command? An example may make this more clear: I have `ls` aliased to `ls -lF`. Let's say I'd like to also alias `d` to `ls -l | grep -E "^d"`: does `d` now use `ls -lF` in place of `ls`? If so, is it a matter of order in the .bash_aliases configuration file? `man alias` didn't enlighten me.


title: What will happen if I run the command init in my Ubuntu Gnome terminal?

text: command `init` seems to be the first process running after each booting. If I `init` in my Ubuntu Gnome terminal, will that restart my OS?


title: Motd not changing

text: My /etc/motd file is showing duplicate messages. When I edit it manual, it keeps returning to the messed up version whenever a user logs in. How do I stop this? I'm using Ubuntu 10.04


title: How can I run a script that starts before my login screen?

text: I was calibrating my touch screen, and saw that the best tool around was xinput_calibrator. So I used it. It have two options (one of which did not work), so I am here for the second. It says I should execute this command "in a script that starts with your X session": `xinput set-int-prop "3M 3M USB Touchscreen - EX II" "Evdev Axis Calibration" 32 14410 2146 14574 2115` So I tried `~/.xinitrc`, `~/.xsession` and `~/.xsessionrc`, all of which did not exist. So I created them and the exact content was this command. The first two files made my logins fail (after I login, I fall back to the login screen). With the last file, the calibration was functional, but only after logging in... I need that command to run **before** the login dialog shows up. I thought of adding this command to the end of `/etc/X11/xinit/xinitrc` with no result (nothing changed). Also, I tried to add it to the end of `/etc/X11/Xsession.d/40x11-common_xsessionrc` (after inspecting some of the files), but the result was exactly the same as adding it to `~/.xsessionrc`. How can I make this command run before the login screen shows (is this before the window manager starts, or before the X session starts)? Any clue will be appreciated. Thanks in advance. (I am running Kubuntu with the default window manager, if that matters) **UPDATE** As I am using Kubuntu, my display manager is kdm. As the accepted answer suggests, I edited the file `/etc/kde4/kdm/Xsetup`, and as mentioned here I added the command before the command that is there by default. And it works like a charm :)


title: How to change the working directory for a shell script

text: I have a Python script that looks files up in a relative directory. For example: the Python script is in `/home/username/projectname/`. I have a file that is being called within the Python script that is in `/home/username/projectname/subfolder`. If I run the script from the shell as `python scriptname.py` it runs perfectly fine. However, I'm trying to run the script as a startup service. I'm setting it up in webmin, and I believe its creating a shell script to call it. Through the startup script, I'm doing something like this to call the script:               execute python home/username/projectname/scriptname.py      The script is starting up fine, but it can't access the files in the relative directory. I am guessing that there is a better way to call the Python program from within the startup script so that its aware of the relative path.


title: git and sshfs: status is inaccurate

text: I am mounting a git repository on a virtual machine over sshfs onto my host machine. So far so good. However, git claims that there are many uncommitted changes when viewing the repository over sshfs. _Why is that?_ The relevant bit from `/etc/fstab`, if that helps:               sshfs#usr@virtual:/home/user/repos /home/user/repos/ fuse noauto,user,uid=1000,gid=1000,umask=0,workaround=rename 0 0      Note: _Cloning, push, and pull operations could done instead but the code needs to compile on the virtual machine OS and not on the host machine -- long story, it **has** to be this way. I do not fancy doing a commit per compile, that's just silly._


title: find: combining -path and -prune to exclude files and directories

text: I have a directory `/srv/tftp/pxelinux.cfg` and a file `/etc/mtab`. I want to exclude both from `find`. But whatever I do, either one always is not excluded               find /etc /srv -path /srv/tftp/pxelinux.cfg -prune -o \! -path /etc/mtab     find /etc /srv \( -path /srv/tftp/pxelinux.cfg -prune -o -print \) -a \( \! -path /etc/mtab \)      could somebody please advise how to do it? Note: I find the `-path /foo -prune -o -print` syntax highly confusing and unintuitive


title: Font problem with Openbox session

text: I'm using Lubuntu 13.04 and thought to try out the Openbox session instead of the Lubuntu session which I normally use and have customized to my needs. One problem I would like help with is the appearance of fonts. The image shows the difference of a window in the Openbox session (top) and the same window in the Lubuntu session (bottom). ![Openbox versus Lubuntu](http://i.stack.imgur.com/VHAIO.png) How do I make the fonts in the Openbox session look like those in the Lubuntu session?


title: External drive chmod does nothing

text: Why is it that I can do chmod on my files when they are on my laptops hard drive, but when i make files on my external drive, i can't change their access rights. I do:   chmod 755 somefile, and on my local drive, the rights change accordingly,   but the very same command does nothing on my external drive.   How comes?


title: Failure in the middle of a Debian upgrade

text: I am facing an very serious problem. I am updating my laptop from Debian 7.0 to the current testing distro. One package(`veusz.helper`) dependency was lost and the upgrade process can't move forward. But nearly 1000 packages have been uninstalled already. And the system is stuck. So I have to reboot, but the problem is the system has also uninstalled the `vmlinuz` and `initrd.gz` so grub cannot recognize the Linux volume. And the newly downloaded packages are still in `/var/apt/cache/archives`. Is there any way I can proceeded with the upgrade process and figure out the dependency problem?


title: How do I create a USB networking interface for passing internet to my Android phone?

text: I am working on passing through the internet from my computer to my phone (running Android) over USB. I'm not sure how to achieve this, but I know I will need a usb network interface, such as `usb0`. This interface is not automatically created when plugging in the phone. How do I create this USB network interface? Can this be done within Linux or must it be done from the Android phone? **Note:** If I enable USB tethering on the phone, then a corresponding USB interface is created in Linux. However this is automatically configured to use the phone as a network device (or a gateway?) and pass the internet from my phone to my computer, which is the opposite of what I'm trying to do.


title: Bash While loops

text: I have a loop set up like the following               #!/bin/bash     cat $1|while read line;do         wget --limit-rate=50k http://url/$line.json -O got-$line;         if [ "$?" -ne "0" ]; then             rm got-$line;         fi         sleep 4;     done      But when i call it ./script inputfile.txt I get the following error               rm: cannot remove `got-inputfile.txt': No such file or directory     --2012-12-30 12:18:06--  (start of wget output and everything works normal)      Like the loop is running before there is any input Any suggestions ?


title: What's the closest thing to a server version of Fedora?

text: Fedora seems to bill itself as a client-only OS, in contrast to Ubuntu or SuSE which have both client and servers versions. What is the closest Linux distribution to Fedora that's usable as a server operating system? Or am I misunderstanding the situation with Fedora, and it's a perfectly viable option for using on services such as Linode?


title: Does each user get his/her own tty(s)?

text: I put a simple echo command in a CLI tty by user1 expecting it to reach user2 who is logged in a separate tty.               echo "Hello, world!" >> /dev/tty5      I expected user2 to get the echo message but nothing shows up. Does each user get his/her own "set" of tty[1-7]? Edit: I suspect this may be a permissions issue. I was actually exploring `cron` jobs and had set a `cron` job to `echo` a "hello world" message every minute from `user1` logged into `tty2` directed to `tty5` where `user2` is logged in but `user2` never got the echoed messages.


title: bash myscript.sh runs in bash, but the first line is #!/usr/bin/sh

text: I have a script similar following one:               #!/usr/bin/sh          var="ABC"     if [ $var == "ABC" ]     then        echo True     else        echo False     fi      Above code does not work in Solaris Sparc and Solaris X64. It is showing `==` undefined. Above code works fine If I replace `==` with `=`. Strange thing is If I ran above code without any change by following method it is working.               #bash test.sh      According to my understanding the script should not work even with bash, as at the top of the script I am using `#!/bin/sh` which does not support the `==` as the comparison operator. Can anyone please explain why it does work when I am running the script as mentioned above. Note: I am aware of that bash does recognize `==` and `=`.


title: Cent OS 6.3: How to make places show up folders in tabbed versions (or at least not in a new window)

text: I moved to CentOS 6.3 recently. The places application shows folders but each folder is shown in a new window. So if I go to 2 different folders and go deep in 3 sub folders, I will have six windows open. I thne end up closing all the folders and it becomes a problem. Is there a way to open folders in tab


title: Really strange FAT32 file listing problem

text: I'm mounting a FAT32 drive on my NAS (which has a USB port), and hitting a strange issue when I use the `ls` command on the drive root:               ls: cannot access ???²é?u.g: Input/output error     ls: cannot access ?f$?â?.k: Input/output errorPuTTY     ls: cannot access ?21ï??é.ìk?: Input/output error     ls: cannot access ºq`{??ùê.?zï: Input/output error     ls: cannot access +?l`æ~2?.]9: Input/output error     ls: cannot access ??j.é: Input/output error     ls: cannot access ëégö²?è.?« Input/output error     ?.¢??: Input/output error     ls: cannot access ??d?¬«ëc.?½f: Input/output error     ls: cannot access ?r??%f.o??: Input/output error     ls: cannot access b}?çb¼=u.?c·: Input/output error     }??..÷p½: Input/output error     ls: cannot access u?;e?j?.      I'm not sure why "PuTTy" is thrown in there on the second line. It is the client I'm using to access the NAS, and I'm running the latest version, but I don't understand what it has to do with the `ls` command. It goes on like this for a while and then starts listing files that aren't really there along with the files that are:               ï¿½?=?^Oaaï¿½.h?=     ?*ab^G^S??.?^[?     a?cw??^?*.=?$     ï¿½??aï¿½hï¿½ï¿½.?ï¿½?     ??aï¿½?^_j!.?i?     ï¿½?a?m??^U.a^G^?     apps     ??^Q??a?y.ï¿½?z      I'm running Debian/Lenny (now), but I had the same problem before I switched to Debian on my NAS. I'm not sure which distro I was running before, I think it was a custom build. When I plug the drive in, `sdc` and `sdc1` appear in the `/dev` directory. I'm unable to mount `sdc`, but can successfully mount `sdc1`. These are the command I've tried using to mount:               mount /dev/sdc1 /USB     mount -t vfat /dev/sdc1 /USB     mount -o umask=0 -t vfat /dev/sdc1 /USB          # Additional     mount -t vfat -o codepage=850 /dev/sdc1 /USB     mount -t msdos -o codepage=850 /dev/sdc1 /USB     mount -t vfat -o codepage=869 /dev/sdc1 /USB     mount -t vfat -o codepage=850,iocharset=iso8859-7 /dev/sdc1 /USB     # ... and combinations of codepage 850, 869, 437 (the common ones)     # ... and combinations of utf8, iso8859-7, iso8859-1     # ... and additional flags such as umask=0, rw      If I check the logs after the `ls` command, this is the result:               $ dmesg | tail     FAT: Filesystem panic (dev sdc1)         invalid access to FAT (entry 0x8c31db6e)     FAT: Filesystem panic (dev sdc1)         invalid access to FAT (entry 0xee786bb9)     FAT: Filesystem panic (dev sdc1)         invalid access to FAT (entry 0x2f16a272)     FAT: Filesystem panic (dev sdc1)         invalid access to FAT (entry 0xa8ee938e)     FAT: Filesystem panic (dev sdc1)         invalid access to FAT (entry 0x6df5a84f)      I'll be honest, my Linux knowledge isn't that great -- it's limited mostly to basic administrative tasks. Of course, if I plug the drive into Windows (7) it works fine. One final note perhaps worth mentioning is that I remember having to use a special tool to format the drive because it was too large for Windows to format it. **EDIT** On closer inspection of the drive, all files appear to be present - so where is linux getting all this garbage from? There are only several files and folders in the root directory on Windows. Could it be data that has not been properly disposed of? **EDIT 2** The same problem in Ubuntu on my Laptop PC. Both `ls` and the file explorer show these strange file listings.


title: How to import numpy

text: I am trying to find density of states with `dftb+` in a Linux system. I have a Linux system with `Python-2.7.5` and `Numpy-1.8.1`. I am using the command as written below:               gagan@gagan-desktop:~/tests$ /home/gagan/dptools-0.1p3/bin/dp_dos band.out dos_total.dat      I am getting error as follows:               Traceback (most recent call last):     File "/home/gagan/dptools-0.1p3/bin/dp_dos", line 8, in <module>     import numpy as np     ImportError: No module named numpy


title: Bash -c with positional parameters

text: Usually, `$0` in a script is set to the name of the script, or to whatever it was invoked as (including the path). However, if I use `bash` with the `-c` option, `$0` is set to the first of the arguments passed after the command string:               bash -c 'echo $0 ' foo bar      # foo       In effect, it seems like positional parameters have been shifted, but including `$0`. However `shift` in the command string doesn't affect `$0` (as normal):               bash -c 'echo $0; shift; echo $0 ' foo bar     # foo     # foo      Why this apparently odd behaviour for command strings? Note that I am looking for the reason, the rationale, behind implementing such odd behaviour. * * * One could speculate that such a command string wouldn't need the `$0` parameter as usually defined, so for economy it is also used for normal arguments. However, in that case the behaviour of `shift` is odd. Another possibility is that `$0` is used to define the behaviour of programs (a la `bash` called as `sh` or `vim` called as `vi`), but that cannot be, since `$0` here is only seen in the command string and not by programs called within it. I cannot think of any other uses for `$0`, so I am at a loss to explain this.


title: Xvideo extension not active with the radeon driver

text: On my computer running Debian squeeze with the `radeon` driver, the XVideo extension doesn't work (the extension itself is there but the hardware is not supported). `xvinfo` shows               X-Video Extension version 2.2     screen #0      no adaptors present      The adapter is a Gigabyte Radeon X1650, shown by `lspci` as               01:00.0 VGA compatible controller: ATI Technologies Inc RV535 [Radeon X1650 Series] (rev 9e)      The kernel driver is loaded, as `lsmod | grep radeon` shows:               radeon                574044  1      ttm                    40018  1 radeon     drm_kms_helper         20065  1 radeon     drm                   142391  3 radeon,ttm,drm_kms_helper     i2c_algo_bit            4225  1 radeon     i2c_core               15712  6 eeprom,radeon,drm_kms_helper,drm,i2c_algo_bit,i2c_i801      The required (?) (non-free) firmware also seems to be loaded. From my kernel logs:               Mar 14 18:59:33 darkstar kernel: [   11.883832] [drm] Loading R500 Microcode     Mar 14 18:59:33 darkstar kernel: [   11.883834] platform radeon_cp.0: firmware: requesting radeon/R520_cp.bin      XVideo worked under Debian lenny. After upgrading to squeeze (Linux kernel: `2.6.32-5-vserver-amd64`; `xserver-xorg-video-ati 6.13.1-2+squeeze1`) it doesn't. How do I get it back? (link to the X server logs)


title: Ubuntu machine with RNDIS tethered phone can not receive packets from internet

text: I tried to tether my old Windows Mobile 6 phone with my Ubuntu computer to use the phone's network. However, even though the kernel seems to recognize the phone and it is used as a network device I can not receive any packets from http-requests. The following output is from dmesg:               [  230.884554] rndis_host 1-1.1:1.0: dev can't take 1558 byte packets (max 1536), adjusting MTU to 1478     [  230.892791] rndis_host 1-1.1:1.0: RNDIS_MSG_QUERY(0x00010202) failed, -47     [  230.910356] rndis_host 1-1.1:1.0: eth1: register 'rndis_host' at usb-0000:00:1a.0-1.1, RNDIS device, 80:00:60:0f:e8:00     [  230.910382] usbcore: registered new interface driver rndis_host     [  241.853911] eth1: no IPv6 routers present      So, the phone is recognized as eth1:               eth1      Link encap:Ethernet  HWaddr 80:00:60:0f:e8:00             inet addr:192.168.0.57  Bcast:192.168.0.255  Mask:255.255.255.0           inet6 addr: fe80::8200:60ff:fe0f:e800/64 Scope:Link           UP BROADCAST RUNNING MULTICAST  MTU:1478  Metric:1           RX packets:953 errors:759 dropped:0 overruns:0 frame:0           TX packets:1223 errors:0 dropped:0 overruns:0 carrier:0           collisions:0 txqueuelen:1000            RX bytes:197786 (197.7 KB)  TX bytes:224916 (224.9 KB)      And pinging an internet address works as well:               PING www.l.google.com (173.194.69.105) 56(84) bytes of data.     64 bytes from bk-in-f105.1e100.net (173.194.69.105): icmp_req=1 ttl=40 time=299 ms     64 bytes from bk-in-f105.1e100.net (173.194.69.105): icmp_req=2 ttl=40 time=117 ms     64 bytes from bk-in-f105.1e100.net (173.194.69.105): icmp_req=3 ttl=40 time=136 ms     64 bytes from bk-in-f105.1e100.net (173.194.69.105): icmp_req=4 ttl=40 time=135 ms     64 bytes from bk-in-f105.1e100.net (173.194.69.105): icmp_req=5 ttl=40 time=344 ms     64 bytes from bk-in-f105.1e100.net (173.194.69.105): icmp_req=6 ttl=40 time=103 ms          --- www.l.google.com ping statistics ---     6 packets transmitted, 6 received, 0% packet loss, time 5005ms     rtt min/avg/max/mdev = 103.563/189.388/344.436/95.197 ms      But when I try to retrieve a web page it does not work (as an example the output of a wget request):               % wget www.google.com     --2012-01-16 18:59:12--  http://www.google.com/     Resolving www.google.com... 173.194.69.105, 173.194.69.106, 173.194.69.147, ...     Connecting to www.google.com|173.194.69.105|:80... connected.     HTTP request sent, awaiting response... 302 Moved Temporarily     Location: http://www.google.de/ [following]     --2012-01-16 18:59:12--  http://www.google.de/     Resolving www.google.de... 173.194.69.94     Connecting to www.google.de|173.194.69.94|:80... connected.     HTTP request sent, awaiting response... ^C      So I am really surprised why this does not work an hope someone here has an idea how I could get it to work. Thanks in advance.


title: Copy from linux to windows every minute

text: I currently quickly setup a way to copy files from my linux machine to a windows share that multiple people can access, but I'm looking for a better way. In Windows 7, I made a folder accessible to Everyone. In linux, I made the directory /mnt/windows_share and mounted the windows share using samba:               sudo mount -t cifs -o username=mouche,password=1234 //COMPUTERNAME/share_dir /mnt/windows_share      Then I ran this script using sudo in the directory I want to copy files from:               #!/usr/bin/perl -w     while (1)     {         system("cp -u * /mnt/windows_share/");         sleep 1;     }      One problem with this is that it updates Windows "Date Modified" properties every time it updates, even though I added the -u option to cp. Also, if the machine reboots, the mount command and the script have to be run again (with sudo, so you need to know the password). Any suggestions on how to improve this process?


title: ffmpeg and libvpx: error while loading shared libraries

text: When I run ffmpeg I get the following error: `/usr/local/bin/ffmpeg: error while loading shared libraries: libvpx.so.1: cannot open shared object file: No such file or directory` Output of `ls -l /usr/lib/libvpx*`:               lrwxrwxrwx 1 root root     15 Nov  2 14:10 /usr/lib/libvpx.so.0 -> libvpx.so.0.0.0     lrwxrwxrwx 1 root root     15 Nov  2 14:10 /usr/lib/libvpx.so.0.0 -> libvpx.so.0.0.0     -rwxr-xr-x 1 root root 409800 Jun 25  2011 /usr/lib/libvpx.so.0.0.0      What should I do?


title: Remove yum repo using yum

text: I have no root access on my machine at work, but I have sudo permission to use `sudo yum` (and only yum). Recently I accidentally installed a faulty repository (dropbox), and now I'd like to remove it. Since I have no write access to the `yum.repos.d` directory, manually editing or removing the repo file is out of the question. I know you can install repos using yum (it's what I did), but **can you remove a repo using yum?** Using Scientific Linux 6. _By the way, I know I can`yum --disablerepo=` to ignore the problematic repo. But I would like to remove it for good, because it's also causing problems with the graphical package manager (it keeps popping up notifications saying the updates couldn't be retrieved)._


title: OwnCloud on XBMC Distro

text: I recently bought a raspbery pi with the purpose of building a cheap good multimedia station. As soon as i heard about the XBMC distribution and saw some videos of it in action i decided to try it myself. I just have one question, can i install the OwnCloud in a XBMC dist ? it would be very useful for me if i could be anywhere at home/work uploading multimedia to it and when i get to my bedroom, there we are, dont even have to bother with external hdd.


title: Renumbering windows in tmux

text: I frequently end up with more than ten windows in tmux. Later on, I close some of my older ones. Is there a way to renumber, say window 15, to window 3 (which doesn't exist anymore)? Or to `pack` them all up again, so that there are no empty slots? I'd like to do this because it is difficult to jump to higher numbered windows, because you can't do `Ctrl+B, 15`. I have to use `Ctrl+B, w` to list the windows and then type the letter corresponding to the window I want to open. I know that I can swap windows. For example, I could create a new window (`Ctrl+B, c`) which would open in the empty slot 3. I can then `swapw` window 15 and window 3 and then close window 15. Obviously, this is a tedious approach. How do you manage many windows in tmux?


title: How to make less show the previous lines when searching?

text: How can I make `less` show the previous couple of lines when I search for something? I'd like to get rid of the `kkk` steps in my usual process:   * `/keyword`   * `kkk`   * (read)   * `n`   * `kkk`   * (read)


title: Rsyncing multiple files with white spaces in the names

text: I'm trying to back up files onto a server, but I'm having problems with files that have white spaces in the names. I'm using this command in terminal:               FILES="testing/space\ in\ filename testing/and\ again"; rsync -v $FILES server::address      `testing` is the folder, with the two files being `space in filename` and `and again`. When I run that, I get the following result:               rsync: link_stat "/home/user/testing/space\" failed: No such file or directory (2)     rsync: link_stat "/home/user/in\" failed: No such file or directory (2)     rsync: link_stat "/home/user/filename" failed: No such file or directory (2)     rsync: link_stat "/home/user/testing/and\" failed: No such file or directory (2)     rsync: link_stat "/home/user/again" failed: No such file or directory (2)      I've been looking into using the `\--protect-args` option, but I haven't been able to get that working either.


title: Does multitail follow the inode or the file name by default?

text: For `logrotate`d files one usually uses `tail -F` instead of `tail -f` to follow the log file contents. Does `multitail(1)` automatically follow the name instead of the inode (which likely changes with the log rotation)? I sifted through the documentation and also searched on the web, but wasn't able to come up with a conclusive answer. * * * Thanks to the accepted answer I found that the `man` page does mention the option I wanted, but uses the term "descriptor" instead of "inode". So this question and the answer should be the glue for the next person researching the topic.               -f Follow the following filename, not the descriptor.          --follow-all       For all files after this switch: follow the following filename, not the descriptor.


title: I hang when I try to ssh into a machine with my username (or su to my user)

text: Yesterday I was freely able to ssh into server box-a, and it seemingly froze on me today so I killed my putty instance. I am now unable to ssh into it. It ssh's but the prompt does not appear. I am able to ssh using a different username, and then if i try to `su` into my user it hangs as well:               ssh notme@box-a     box-a:/home/notme> su myuser     Password:      and just hangs. Why could this be (on bash)? Debug output:               ld-chhfemd01: ssh -vvv ld-chhfemd02     OpenSSH_4.3p2, OpenSSL 0.9.8e-fips-rhel5 01 Jul 2008     debug1: Reading configuration data /etc/ssh/ssh_config     debug1: Applying options for *     debug3: cipher ok: aes128-cbc [aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour,aes192-cbc,aes256-cbc]     debug3: cipher ok: 3des-cbc [aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour,aes192-cbc,aes256-cbc]     debug3: cipher ok: blowfish-cbc [aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour,aes192-cbc,aes256-cbc]     debug3: cipher ok: cast128-cbc [aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour,aes192-cbc,aes256-cbc]     debug3: cipher ok: arcfour [aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour,aes192-cbc,aes256-cbc]     debug3: cipher ok: aes192-cbc [aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour,aes192-cbc,aes256-cbc]     debug3: cipher ok: aes256-cbc [aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour,aes192-cbc,aes256-cbc]     debug3: ciphers ok: [aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour,aes192-cbc,aes256-cbc]     debug2: ssh_connect: needpriv 0     debug1: Connecting to ld-chhfemd02 [10.32.242.71] port 22.     debug2: fd 3 setting O_NONBLOCK     debug1: fd 3 clearing O_NONBLOCK     debug1: Connection established.     debug3: timeout: 30000 ms remain after connect     debug1: identity file /home/myuser/.ssh/identity type -1     debug3: Not a RSA1 key file /home/myuser/.ssh/id_rsa.     debug2: key_type_from_name: unknown key type '-----BEGIN'     debug3: key_read: missing keytype     debug3: key_read: missing whitespace     debug3: key_read: missing whitespace     debug3: key_read: missing whitespace     debug3: key_read: missing whitespace     debug3: key_read: missing whitespace     debug3: key_read: missing whitespace     debug3: key_read: missing whitespace     debug3: key_read: missing whitespace     debug3: key_read: missing whitespace     debug3: key_read: missing whitespace     debug3: key_read: missing whitespace     debug3: key_read: missing whitespace     debug3: key_read: missing whitespace     debug2: key_type_from_name: unknown key type '-----END'     debug3: key_read: missing keytype     debug1: identity file /home/myuser/.ssh/id_rsa type 1     debug1: identity file /home/myuser/.ssh/id_dsa type -1     debug1: loaded 3 keys     debug1: Remote protocol version 2.0, remote software version OpenSSH_4.3     debug1: match: OpenSSH_4.3 pat OpenSSH*     debug1: Enabling compatibility mode for protocol 2.0     debug1: Local version string SSH-2.0-OpenSSH_4.3     debug2: fd 3 setting O_NONBLOCK     debug1: SSH2_MSG_KEXINIT sent     debug1: SSH2_MSG_KEXINIT received          debug2: kex_parse_kexinit: diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1     debug2: kex_parse_kexinit: ssh-rsa,ssh-dss     debug2: kex_parse_kexinit: aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour,aes192-cbc,aes256-cbc     debug2: kex_parse_kexinit: aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour,aes192-cbc,aes256-cbc     debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96     debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96     debug2: kex_parse_kexinit: zlib@openssh.com,zlib,none     debug2: kex_parse_kexinit: zlib@openssh.com,zlib,none     debug2: kex_parse_kexinit:     debug2: kex_parse_kexinit:     debug2: kex_parse_kexinit: first_kex_follows 0     debug2: kex_parse_kexinit: reserved 0     debug2: kex_parse_kexinit: diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1     debug2: kex_parse_kexinit: ssh-rsa,ssh-dss     debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arc\     four,rijndael-cbc@lysator.liu.se     debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arc\     four,rijndael-cbc@lysator.liu.se     debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96     debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96     debug2: kex_parse_kexinit: none,zlib@openssh.com,zlib     debug2: kex_parse_kexinit: none,zlib@openssh.com,zlib     debug2: kex_parse_kexinit:     debug2: kex_parse_kexinit:     debug2: kex_parse_kexinit: first_kex_follows 0     debug2: kex_parse_kexinit: reserved 0     debug2: mac_init: found hmac-md5     debug1: kex: server->client aes128-cbc hmac-md5 zlib@openssh.com     debug2: mac_init: found hmac-md5     debug1: kex: client->server aes128-cbc hmac-md5 zlib@openssh.com     debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent     debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP     debug2: dh_gen_key: priv key bits set: 135/256     debug2: bits set: 514/1024     debug1: SSH2_MSG_KEX_DH_GEX_INIT sent     debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY     debug3: check_host_in_hostfile: filename /home/myuser/.ssh/known_hosts     debug3: check_host_in_hostfile: match line 79     debug3: check_host_in_hostfile: filename /home/myuser/.ssh/known_hosts     debug3: check_host_in_hostfile: match line 79     debug1: Host 'ld-chhfemd02' is known and matches the RSA host key.     debug1: Found key in /home/myuser/.ssh/known_hosts:79     debug2: bits set: 522/1024     debug1: ssh_rsa_verify: signature correct     debug2: kex_derive_keys     debug2: set_newkeys: mode 1     debug1: SSH2_MSG_NEWKEYS sent     debug1: expecting SSH2_MSG_NEWKEYS     debug2: set_newkeys: mode 0     debug1: SSH2_MSG_NEWKEYS received     debug1: SSH2_MSG_SERVICE_REQUEST sent     debug2: service_accept: ssh-userauth     debug1: SSH2_MSG_SERVICE_ACCEPT received     debug2: key: /home/myuser/.ssh/identity ((nil))     debug2: key: /home/myuser/.ssh/id_rsa (0x2ac6af877020)     debug2: key: /home/myuser/.ssh/id_dsa ((nil))     debug1: Authentications that can continue: publickey,password     debug3: start over, passed a different list publickey,password     debug3: preferred gssapi-with-mic,publickey,keyboard-interactive,password     debug3: authmethod_lookup publickey     debug3: remaining preferred: keyboard-interactive,password     debug3: authmethod_is_enabled publickey     debug1: Next authentication method: publickey     debug1: Trying private key: /home/myuser/.ssh/identity     debug3: no such identity: /home/myuser/.ssh/identity     debug1: Offering public key: /home/myuser/.ssh/id_rsa     debug3: send_pubkey_test     debug2: we sent a publickey packet, wait for reply     debug1: Server accepts key: pkalg ssh-rsa blen 149     debug2: input_userauth_pk_ok: SHA1 fp f1:2c:f7:09:b6:b7:ff:83:c5:e7:98:da:f4:fe:ea:66:05:32:f7:9c     debug3: sign_and_send_pubkey     debug1: read PEM private key done: type RSA     debug1: Enabling compression at level 6.     debug1: Authentication succeeded (publickey).     debug1: channel 0: new [client-session]     debug3: ssh_session2_open: channel_new: 0     debug2: channel 0: send open     debug1: Entering interactive session.     debug2: callback start     debug2: x11_get_proto: /usr/bin/xauth  list unix:18.0 2>/dev/null     debug1: Requesting X11 forwarding with authentication spoofing.     debug2: channel 0: request x11-req confirm 0     debug2: client_session2_setup: id 0     debug2: channel 0: request pty-req confirm 0     debug3: tty_make_modes: ospeed 38400     debug3: tty_make_modes: ispeed 38400     debug3: tty_make_modes: 1 3     debug3: tty_make_modes: 2 28     debug3: tty_make_modes: 3 127     debug3: tty_make_modes: 4 21     debug3: tty_make_modes: 5 4     debug3: tty_make_modes: 6 0     debug3: tty_make_modes: 7 0     debug3: tty_make_modes: 8 17     debug3: tty_make_modes: 9 19     debug3: tty_make_modes: 10 26     debug3: tty_make_modes: 12 18     debug3: tty_make_modes: 13 23     debug3: tty_make_modes: 14 22     debug3: tty_make_modes: 18 15     debug3: tty_make_modes: 30 0     debug3: tty_make_modes: 31 0     debug3: tty_make_modes: 32 0     debug3: tty_make_modes: 33 0     debug3: tty_make_modes: 34 0     debug3: tty_make_modes: 35 0     debug3: tty_make_modes: 36 1     debug3: tty_make_modes: 37 0     debug3: tty_make_modes: 38 1     debug3: tty_make_modes: 39 0     debug3: tty_make_modes: 40 0     debug3: tty_make_modes: 41 0     debug3: tty_make_modes: 50 1     debug3: tty_make_modes: 51 1          debug3: tty_make_modes: 52 0     debug3: tty_make_modes: 53 1     debug3: tty_make_modes: 54 1     debug3: tty_make_modes: 55 1     debug3: tty_make_modes: 56 0     debug3: tty_make_modes: 57 0     debug3: tty_make_modes: 58 0     debug3: tty_make_modes: 59 1     debug3: tty_make_modes: 60 1     debug3: tty_make_modes: 61 1     debug3: tty_make_modes: 62 0     debug3: tty_make_modes: 70 1     debug1: Sending environment.     debug3: Ignored env GREP_COLOR     debug3: Ignored env HOSTNAME     debug3: Ignored env _     debug2: channel 0: request shell confirm 0     debug2: fd 3 setting TCP_NODELAY     debug2: callback done     debug2: channel 0: open confirm rwindow 0 rmax 32768     debug2: channel 0: rcvd adjust 2097152     Last login: Wed Jan 30 14:38:32 2013 from ld-chhfemd01.rocks.com     Kickstart-Installed Fri Oct 12 17:17:04 CDT 2012     Red Hat Enterprise Linux Server release 5.8 (Tikanga)      so it seems to log in but then hang.


title: Wireless problem with RTL8723 and Fedora 18: can't connect to a wpa2-secured network

text: I'm running Fedora 18 on a Toshiba laptop with the notorious RTL8723 wireless card. I've been able to compile the driver using lwfinger's instructions from this forum thread here               wget http://linuxwireless.org/download/compat-wireless-2.6/compat-wireless-2012-10-03.tar.bz2     wget http://www.lwfinger.com/realtek_drivers/rtl8723ae_master_patch     tar jxvf compat-wireless-2012-10-03.tar.bz2     cd compat-wireless-2012-10-03/     patch -p1 < ../rtl8723ae_master_patch     make     sudo make install     sudo modprobe -v rtl8723ae      After performing these steps the device can indeed see the available wireless networks. The problem appears when I actually try to connect to one of the WPA2-secured ones -- the Gnome network manager keeps asking me for authentication and refuses to establish the connection. I take it I should now figure out whether this is a driver issue or a network manager issue (or something else) but I'm not sure how to proceed. **EDIT:** It appears that the problem isn't with the network manager after all: after disabling Network Manager I tried running `wpa_supplicant` from the terminal, and all I got in response were the following messages, which just kept coming:               wlan0: Trying to associate with 7c:4f:b5:8e:a0:87 (SSID='mynetwork' freq=2462 MHz)     ioctl[SIOCSIWFREQ]: Device or resource busy     wlan0: Association request to the driver failed     wlan0: Associated with 7c:4f:b5:8e:a0:87     wlan0: Authentication with 7c:4f:b5:8e:a0:87 timed out.     wlan0: CTRL-EVENT-DISCONNECTED bssid=00:00:00:00:00:00 reason=0     wlan0: Trying to associate with 7c:4f:b5:8e:a0:87 (SSID='mynetwork' freq=2462 MHz)     ioctl[SIOCSIWFREQ]: Device or resource busy     wlan0: Association request to the driver failed     wlan0: Associated with 7c:4f:b5:8e:a0:87


how do I save my buffer in vi without exiting? .


title: How to find old directories in local directory using find in AIX?

text: I need to find all old directories in current directory.   find in AIX does not provide -maxdepth parameter.   There is only -depth and -prune parameters.   It is possible to write something like following:               find ./* -type d -mtime +31 -prune      But it will not work if current directory is empty.   What is the correct way to find all old directories _in current directory only_ , **not in all sub-directories of the current directory**?


title: Finding lists of files with specific permissions

text: I looked into the find command and came up with `find . -maxdepth 1 -perm 521 > test.txt` to output the permissions to a text file, but is it possible to do it just using, for example, simple commands like `ls`? As far as I know, `ls` can't seem to reference permissions specifically so I can't give it a certain permission set to look for. Is there any other straightforward method I may be overlooking?


title: Installing Ioncube loaders without issues CentOS 5.9

text: Seem to be having issues installing Ioncube loaders on CentOS 5.9. I followed this guide to install Ioncube: but it's still not working on the site at all, I keep getting this error on BoxBilling, which is the system that I'm trying to get working: ionCube loader is required to run BoxBilling. Instructions to install ionCube loaders or contact support No idea why? I've looked around and looked around on google, but there doesn't seem to be many articles on it, I could get it working on CentOS 6.3, but we recently were forced to downgrade, and now I can't get it working. Any ideas?


title: What is the 'pam-panel-icon' window?

text: After starting GNOME desktop, a window titled 'pam-panel-icon' appears, initially displayed in the upper-left of the desktop sized as small as possible. It can be resized, minimized, or maximized, but if it is closed it immediately reappears. There is an old bug report seemingly describing the same behavior with a status of 'CLOSED NOTABUG' filed here. What is the purpose of this window? How do I make it go away?


title: Removing device from USB hub triggers udev event for removing hub

text: I have a udev rule to halt the system when a usb hub is removed:               SUBSYSTEM=="usb", ACTION=="remove", ENV{ID_VENDOR_ID}="050d", ENV{ID_MODEL_ID}="0237", RUN+="/sbin/halt"      Unfortunately, this also triggers when a device plugged into that hub is removed. I have looked through output from `udevadm monitor --udev --property` while plugging and unplugging the devices and there is no set of fields which can be isolated as unique to removing the hub. Does anyone know how I can target just the hub and not include remove events for devices attached to it?


title: How can I change screen's hardstatus color based on the logged in user?

text: I haven't edited/created a .screenrc file in a while, but this is what I'm currently using:               # Turn off the screen startup message     startup_message off          # Define format of bottom navigation/status/date/etc. line     hardstatus alwayslastline "%{yk}[ %H ] %-Lw%50>%{gk}(%{-}%n-%t%{gk})%{-}%+Lw%< %=%{yk}[ %c %d.%m.%Y ]"          # Increase scrollback buffer to 30000 lines     defscrollback 30000      I honestly don't remember what everything in my hardstatus line stands for, but I want to figure out how I could change the hostname color based on the user that is logged in. Is this even possible? Right now, the hostname is yellow when I'm logged in under any user; but I want it to be red if I'm root. Is this something that can be changed in my .bashrc file? I have this in my .bashrc to change new screen window names to the hostname of the server I'm connected to:               # Set screen window title     case "$TERM" in     screen)       PROMPT_COMMAND='echo -ne "\033k$HOSTNAME\033\\"'       ;;     esac      Thanks for any help! **EDIT** I've tried adding this to my .bashrc file, but it just puts the ANSI code in- front of the hostname in my screen hardstatus:               case "$TERM" in     screen)       if (( $UID == 0 )); then         PROMPT_COMMAND='echo -ne "\033k$FRED$HOSTNAME$RS\033\\"'       else         PROMPT_COMMAND='echo -ne "\033k$HOSTNAME\033\\"'       fi       ;;     esac      **EDIT 2** I've also added the actual ANSI color codes (ex: `\\[\033[31m\\]`) and the screen escape codes (ex: `%kr`) to the above statement in my `.bashrc`, but neither worked. **EDIT 3** If I use this as the prompt command line, the hostname appears in red in-front of my PS1:               PROMPT_COMMAND='echo -ne "\033[31m$HOSTNAME\033\\"'      If I use the following prompt, the window name changes to the hostname (YES!); but the color remains the default (NO!):               PROMPT_COMMAND='echo -ne "\033[31m\033k$HOSTNAME\033\\"'      I've also tried replacing `\033[31m` (and just `[31m`) with the screen color escape (%kr), but that did not work either.


title: Suse 12.1 autoyast, root password not set

text: I'm trying to configure autoyast to run via cobbler. For some reason the root password is not getting set. I've tried to use encrypted password and generating a profile from GUI autoyast and then copying the "users" section. Nothing seems to work. This is what I have in the autoyast xml file.               <users config:type="list">          <user>            <encrypted config:type="boolean">false</encrypted>            <user_password>password</user_password>            <username>root</username>          </user>     </users>      Thanks in advance.


Will I utilize graphics hardware if I run X on the server? If not, then what is it there for? E.g. Dell PowerEdge R210 II has integrated Matrox G200eW with 8MB memory on board, and some of the latest Xeon CPUs have integrated Intel GPUs. How do these get used? I will be using the server remotely, connecting to it over ssh and installing all the software from the command line. I plan to try x2go, Xpra and/or TightVNC. Will I utilize graphics card regardless? Seems counter-intuitive to me, as I will never need to display graphics on a locally attached monitor.


title: Arch Linux: python and python2 are in conflict

text: I've recently installed Arch Linux onto my primary (Ubuntu) computer, and it is working _really_ well for me. It's fast, configurable, basically a faster version of Ubuntu. Since `compiz-fusion` isn't installed by default, I'd like to see how much it would impact my performance, but I get this really nice and descriptive error message when I run `pacman` to install it:               [root@arch /]# pacman -S compiz-fusion-gtk     resolving dependencies...     looking for inter-conflicts...     :: python and python2 are in conflict (python<3). Remove python2? [y/N] n     error: unresolvable package conflicts detected     error: failed to prepare transaction (conflicting dependencies)     :: python and python2 are in conflict (python<3)      haven't installed `python3`, and my only installed Python version is `Python 2.7.1`, which doesn't seem to be conflicting with anything. Google didn't turn up any results, so has anybody come across an error like this before? `compiz-fusion` isn't the only package which fails to install because of this python conflict, so quite a few nice packages (like `python- qt`) are uninstallable for me. Any help is help for me. Thanks!


title: Enable kill X.org with an own key combination

text: I've just read Enable kill X.org with ctrl+alt+backspace and am really happy, that `control`-`alt`-`backspace` no longer kills my X-Server. However, I'd like to have a way to kill it; it just should be something more complicated than what I type by accident ten times a day. **Is there a way to define an own binding for the kill?** I'd like to use `control`-`alt`-`meta`-`shift`-`backspace` or alike and from the line                Option          "XkbOptions" "terminate:ctrl_alt_bksp"      it's not obvious how to do it (unless it is "terminate:ctrl_alt_meta_shift_bksp" which doesn't seem to work).


title: Script. How to sort and move catalogs

text: I have some trouble writing a script. I don't know how to sort and move catalogs.               #!/bin/bash     while read -r line; do         mkdir "sd/$line"     done < 1a.txt      After reading information from `1a.txt` script will make 3 catalogs named by those words which are in `1a.txt`. After they are created i need to move the last two catalogs to other directory. So, i don't know how to write a command to do that.


title: Why does one linux distro run hotter than another on laptop?

text: I had been using Arch Linux 64 bit on a Gateway P6860FX for about two years, and recently switched to Ubuntu (also 64 bit). When I type on the keyboard, my left hand feels a lot more warmth than before, and the air coming out of the exhaust port is definitely hotter. (Odd, right now there's no extra heat at all...but anyway...) Only minutes ago did I discover there are ways to monitor the CPU temperature. I have no idea what it was for Arch, but on Ubuntu it's 60-something, rising to 88 when I run heavy number-crunching software for a few minutes. There are good Q&As on this and Superuser on cleaning out dust, and ways to help the computer stay cool. My question is: _why_ would one linix distro run hotter than another? Is there some daemon running in one and not the other, or some device driver difference, or perhaps one but not the other sets the "run really hot" bit in the CPU's mode register, or what? Can knowing this answer help me select the next distro to try? Given several candidate distros that are both 64 bit and meet various requirements, can we predict which ones are going to make this machine run hot?


title: Can I make "less" execute arbitrary commands with a single key sequence?

text: The crux of my question is stated in the title. Reading the `less` and `lesskeys` manpages, I have created a file containing:               ^B shell touch ~/testfile      and run it through `lesskey` to generate `.less-test`, then executed `less -k .less-test file`. This all works fine and does what I hope, except that I need to hit enter twice to actually execute the shell command and return to the `file`. Changing the command to `touch ~/testfile\n` removes the need for one of those enter presses, but `touch ~/testfile\n\n` doesn't work to get rid of them both. Is there a way to bypass hitting enter at all here? As a follow-up question (and to explain why I'm asking in the first place)--I am doing this as a process of file tagging, where I inspect the file using less and want to use these hotkeys to write out to another file with one of two tags (which I plan to bind to two different key sequences). So in addition to not having to press enter twice as above, I'd also like to know if there's a way to immediately move to the next file (as with the `next-file` lesskey command) also (that is, press no other keys besides the tagging key sequence).


title: Joining files on disk

text: Say I have several file with the following naming:               000001     000002     000003     ...      Each of these files is a `csv` file (may include escape characters). In total the folder has `~20GB` of data. How can I stitch these files together into a single final file? In case it matters I usually use `Zsh`.


title: vncserver-x11 binary not found!

text: In which package I can find `vncserver-x11` binary? I installed `x11vnc` and I found only `x11vnc` binary.I don't have any package named `vncserver-x11` in repository. $`uname -a` `Linux 3.2.0-67-generic #101-Ubuntu SMP x86_64 x86_64 x86_64 GNU/Linux`


title: Strange refresh issue with Chromium on Gentoo

text: My system is Gentoo 64bit, with KDE4. I have installed chromium and have been using it for a long time without any problem. But recently, I noticed a strange issue. For example, in a text box, if I type _hello_ , only _hell_ will be displayed. The last _o_ will be displayed only if I do something that could cause page update, like scroll up/down, hover my mouse over a link. This problem also happens with other input controls. I have tried to re-emerge the package, but it does not fix this problem. I really have no idea how to trouble this issue. There's no error log at all.


I am trying to set up an SSH tunnel (on a Raspberry Pi) with the following command: `ssh user@terbank.cs.kuleuven.be -L 5672:tabor.cs.kotnet.leuven.be:5672 -N` (I should note that I can, or at least could, change the first port 5672 to whatever I want) This worked before, as we were able to communicate with the Raspberry Pi with my laptop, which SSH'ed to that server the same way. Now, after some reboots, we get this error (on the Pi) whenever we try to communicate with the Raspberry Pi:               channel 1: open failed: administratively prohibited: open failed      I already checked /etc/hosts, /etc/network/inferfaces and /etc/ssh/sshd_config to comply with solutions found on the internet. This is a copy of our traceroute:               pi@raspberrypi ~ $ sudo traceroute -T -p 5672 tabor.cs.kotnet.kuleuven.be     traceroute to tabor.cs.kotnet.kuleuven.be (10.33.14.4), 30 hops max, 60 byte packets      1  PenO8 (192.168.2.1)  2.033 ms  2.808 ms  3.168 ms      2  10.8.32.252 (10.8.32.252)  9.274 ms  9.380 ms  9.396 ms      3  rhmccoy1-vlan176.kulnet.kuleuven.be (134.58.252.17)  9.181 ms  9.158 ms  9.240 ms      4  * * *      5  * * *      6  * * *      7  * * *      8  * * *      9  * * *     10  * * *     11  * * *     12  * * *


title: Check the filesystem format with BusyBox (stat -f and df -T do not work)

text: I am using latest BusyBox v1.22.1 in my target. I want to check the filesystem type using `stat -f` or `df -T` but busybox doesn't support such commands. `busybox help` shows `stat` command as supported but while executing its showing as               stat: not found.      How can I check the filesystem type using BusyBox?


title: Syslog log analyzer

text: Is there any syslog log analyzer script I can install on hosting to track user activity?   I have giant user log and I need more specific log details.


title: Case-preserving search and replace in vim?

text: In `vim`, I know I can search with or without case sensitivity. But if I want to search for a string in either upper or lower case, and replace it with a replacement of the same case, is that possible in a single `:s///`? For example, I want to change these lines:               short     Short     SHORT      to               long     Long     LONG      I can do this in three `:s` commands, or one insensitive `:s` and go fix the cases manually, but is there a better way? A case-preserving search and replace?


title: Why is there no rootfs file system present on my system?

text: The linux kernel documentation claims: > Rootfs is a special instance of ramfs (or tmpfs, if that's enabled), which > is always present in 2.6 systems. You can't unmount rootfs … On all linux systems I tested (kernel > 2.6 and afaik normal boot procedure, e.g ubuntu 12.04), `mount` does not show a `rootfs` entry. However, with a buildroot image when booting with an external `.cpio` archive, it's present. In what cases is there a `rootfs` entry in `mount`?


title: Executables show with character * next to their name in output of ls

text: I noticed that when I list my executables with `ls` on my Z shell they show up with a character `*` next to their name (e.g. see the file in red `.test_color_scheme`)     ![enter image description here](http://i.stack.imgur.com/cF32K.png) What is causing this? I understand the colors are controlled by by `LS_COLORS`? But is `LS_COLORS` also responsible for showing `*` next to their name? or is there anything else that causes this? **Note:** I verified this happens to all my executable files, and that the character `*` is not part of the file name (e.g. to open the file I type `cat filename` without the `*` character)


title: Copy directory not just the contents

text: I want to copy a directory into another directory. For example, `cp -r dir1 dir2` copies the contents of dir1 into dir2. I want to copy dir1 itself into dir2 so that if I `ls dir2` it will output `dir1` and not whatever was inside of dir1.


title: Cannot switch to TTYs or back

text: I just upgraded to Mint 13 - KDE x64 I am unable to switch to ttys by using the `Ctrl``Alt``F1` .. `F6` keys. The gettys are running and I can switch to the terminals with the `sudo chvt 1` command. I have browsed to quite a few topics and have not reached a solution that works. I even reinstalled grub with `terminal=console`. Once I make a selection at the boot menu, I do not see any boot messages - just KDE starting after a few seconds. How do I fix this?


title: lxde: active window in task bar is indistinguishable from other (inactive)

text: In `LXDE`, the task bar shows tabs for all currently running applications/windows, as shown on the screenshot below: ![enter image description here](http://i.stack.imgur.com/UEofK.png) The problem is, I have hard time distinguishing which window is the one I am in right now (active window) All tabs look the same to me. Is there any way to configure active window to have another color ?


title: How to await Solaris zone boot (first time)

text: Solaris 11. I've found that the zone boot command (e.g. `zoneadm -z myzone boot`) returns before the zone is fully booted/configured. The problem is related to freshly created zones. More precisely what I do is this:               zoneadm -z myzone install -c mytemplate.xml     zoneadm -z myzone boot      When the second line finishes the system reports that the zone is in running state (which is technically true). In reality the zone is still busy doing manifest importing, i.e. doing initial configuration. Therefore at this point there's no guarantee that the artifacts defined in `mytemplate.xml` (such as users) will actually exist. This will typically take an additional minute or two. This is a problem in my scripted creation of zones. I can obviously do a very long `sleep` and hope that by then the zone has finished its configuration tasks but that seems like a stupid solution. I wouldn't know for how long to wait. Is there a way for my script to ensure that the zone's background configuration processes have completed before I continue ?


title: flash_erase & nandwrite seem to work, but uname -a shows the same kernel version

text: I've seen this question: How can I flash_erase mtd0? I have a similar problem with my mini2440. When I use               flash_erase /dev/mtd2 0 0      and then               nandwrite -p -N /dev/mtd2 uImage-mini2440      Everything seems fine, but when I reboot the version of the kernel is exactly the same as it was (shown with `uname -a`) Why don't `flash_erase` and `nadwrite` work?


title: Basic Linux OS with GNU apps and TWM

text: I'm looking for a slim version of GNU/Linux which has:   1. Network stack   2. popular GNU apps   3. TWM Window Manager properly configured   4. Similar structure of Red Hat Linux (optional) It's for a low end PC that's used for monitoring & minor scripting, I understand that there are minimal operating systems that I could start with and adding all the needed applications, But if there's any distro that's specific for this purpose, it would save me some time.


title: Using screen to connect to Cisco console

text: I am trying to configure a Cisco (small business 300) via serial port. I read here: http://www.commandlinefu.com/commands/view/6130/use-screen-as-a- terminal-emulator-to-connect-to-serial-consoles That I can use screen to connect to the switch, but when I try the command               screen /dev/ttyUSB0 9600      All I get is a bunch of weird characters. The gear is connected via a Logilink serial-usb adapter. I had found the name of the chip in that, but now I cant seem to find it again. This is on debian 7.0, but I have tried it on a linux mint as well. Didn't work either. **Edit:** Tried minicom first, didn't work. Which was why I turned to google and found the above site. It seems to work well with screen though, meaning I have just tried it on a windows 7+putty with the newest drivers and it produces the exact same output as with screen. So I am starting to think the damn dongle might be broken.


title: How to detect if a program is not run from a terminal

text: If I am running a reverse TCP shell and attempt to run su, I get the following message:               su: must be run from a terminal      I would like to emulate this behavior in my own program and am wondering how do I detect if a program is being run from a terminal?


title: How can I redirect ports 80 and 443 to 8080 and 8443 with iptables?

text: I'm looking at the documentation for a Tomcat 6 webapp called DSpace, specifically in regardds to running Running DSpace on Standard Ports (80 for http:// and 443 for https://) I am trying to use "Method 1" which uses iptables to redirect traffic from ports 80 and 443 to 8080 and 8443 in order to get rid of the `:8080` in the url. These are the command that the documentation gives:               /sbin/iptables -t nat -I PREROUTING -p tcp --destination-port 80 -j REDIRECT --to-ports 8080     /sbin/iptables -t nat -A OUTPUT -p tcp -d _[server_ip_address|server_ip_address]_ --dport 80 -j  REDIRECT --to-port 8080     /sbin/iptables -t nat -I PREROUTING -p tcp --destination-port 443 -j REDIRECT --to-ports 8443      I think there is something that needs to be changed about the second line, specifically with the section `-d _[server_ip_address|server_ip_address]_` - but I'm not sure what. I've read the `man` page for `iptables` but am not having any luck. I tried changing `-d _[server_ip_address|server_ip_address]_` to:               -d _[127.0.0.1|127.0.0.1]_       and also:               -d _[54.224.121.116|54.224.121.116]_      and also:               -d _[ec2-54-224-112-116.compute-1.amazonaws.com|ec2-54-224-112-116.compute-1.amazonaws.com]_      The errors I'm getting include `Bad argument 'REDIRECT'` and also               host/network '_127.0.0.1' not found      Can anyone help me spot what I'm doing wrong? **update** : I think the redirect will work without the second line, but I'm still not sure what its intended purpose is...


title: Reuse D-Bus sessions across login sessions

text: I access a machine through multiple login sessions. The sessions' lifetimes may or may not overlap. In my case, these login sessions are currently always over SSH, but I would prefer to handle local sessions too. I sometimes need D-Bus in these sessions, and I want to share the same D-Bus session across these login sessions, in order to use GVFS. What is the recommended way to do this? I don't want to break any use of D-Bus that I may not be aware of. I've considered using               export $(dbus-launch --autolaunch $(cat /var/lib/dbus/machine-id))      but (as of Ubuntu 12.04) this doesn't seem right:   * this requires an X session, but my SSH sessions may or may not be forwarding an X display, and even the ones that are don't have the same `$DISPLAY`;   * if no X display is available, `dbus-launch` complains that “Autolaunch error: X11 initialization failed.” and doesn't start a daemon;   * the `dbus-launch` man page states that “The `\--autolaunch` option is considered an internal implementation detail (…). There's no real reason to use it outside of the libdbus implementation anyhow.” Does `dbus-launch` or another tool in the D-Bus suite support automatically detecting a running `dbus-daemon` and connecting to it? The necessary information is in `~/.dbus/session-bus/$(cat /var/lib/dbus/machine- id)-${DISPLAY#*:}` if D-Bus is started with an X connection, but doesn't seem to be stored anywhere if no X connection is available. Should I cobble my own D-Bus session file? If I do, should I use a file in the `~/.dbus/session-bus` directory? Is the path `/var/lib/dbus/machine-id` reliable and portable?


title: Archlinux gizmod

text: I've recently installed Archlinux on my laptop and it's been doing everything I needed except one thing: key bindings. I wanted to be able to use the volume buttons (including when in a full screen game) of my laptop and I read on forums that Gizmod ( https://aur.archlinux.org/packages.php?ID=10089 ) would do it. But the problem is that no matter how I try (yaourt, tar.bz2 or other archives), I get an error:               Scanning dependencies of target H     [  1%] Building CXX object libH/CMakeFiles/H.dir/Average.o     In file included from /home/xavierm02/builds/gizmod-3.4/libH/Average.cpp:31:0:     /home/xavierm02/builds/gizmod-3.4/libH/Average.hpp:74:5: error: ‘size_t’ does not name a type     /home/xavierm02/builds/gizmod-3.4/libH/Average.hpp:76:5: error: ‘size_t’ does not name a type     /home/xavierm02/builds/gizmod-3.4/libH/Average.cpp: In constructor ‘H::Average::Average(int)’:     /home/xavierm02/builds/gizmod-3.4/libH/Average.cpp:53:2: error: ‘mHeadIdx’ was not declared in this scope     /home/xavierm02/builds/gizmod-3.4/libH/Average.cpp:55:2: error: ‘mFillState’ was not declared in this scope     /home/xavierm02/builds/gizmod-3.4/libH/Average.cpp: In member function ‘void H::Average::push(double)’:     /home/xavierm02/builds/gizmod-3.4/libH/Average.cpp:73:6: error: ‘mFillState’ was not declared in this scope     /home/xavierm02/builds/gizmod-3.4/libH/Average.cpp:74:27: error: ‘mHeadIdx’ was not declared in this scope     /home/xavierm02/builds/gizmod-3.4/libH/Average.cpp:79:11: error: ‘mHeadIdx’ was not declared in this scope     /home/xavierm02/builds/gizmod-3.4/libH/Average.cpp:81:2: error: ‘mHeadIdx’ was not declared in this scope     /home/xavierm02/builds/gizmod-3.4/libH/Average.cpp: In member function ‘double H::Average::average()’:     /home/xavierm02/builds/gizmod-3.4/libH/Average.cpp:89:8: error: ‘mFillState’ was not declared in this scope     /home/xavierm02/builds/gizmod-3.4/libH/Average.cpp:93:1: error: control reaches end of non-void function [-Werror=return-type]     cc1plus: all warnings being treated as errors     make[2]: *** [libH/CMakeFiles/H.dir/Average.o] Error 1     make[1]: *** [libH/CMakeFiles/H.dir/all] Error 2     make: *** [all] Error 2      So I thought the last version could be bugged and downloaded the previous one... And I get even more errors... So here are my questions:   * Is there an alternative that gets keys when in full screen too?   * Is this an Archlinux only problem? Because they have .deb packages... But those are basically archive so they could have th same bug, couldn't they? Thank you in advance.


title: Which command will open the default browser on a system to a given web page (terminal)?

text: Title says it all. Is there a way to open the default browser on a user's system to a specific page from within a Bash script, or other-language script?


title: Disable bash tab completion

text: Is it possible to disable bash's autocomplete on pressing tab? The reason I want to do this is that I often paste code from an editor where I use the tab character instead of a number of spaces for indention, into my terminal. And no, you can't convince me to use spaces instead of tabs.


title: GParted messed up my partitions

text: **Update:** running `testdisk` I can actually see all of my files in `/dev/sda1`! I wanted to install Windows alongside my Debian installation in order to play some games. In order to do that, I had to boot up a Ubuntu Live 12.1 DVD and use GParted (I was resizing my main partition which had everything). The resizing finished successfully. I then tried to reboot into my Debian to backup my data, which I had forgotten to do before unfortunately... GRUB loads nicely, but the system cant boot properly! It comes to a point where it tries to configure a "ramdisk", or something like that; then it's just a prompt and that's it. Now I've booted into Ubuntu again, to run a check on my shrank partition. Essentially, it's broken, but I can't really understand the error message. This is what GParted reported:               GParted 0.12.1 --enable-libparted-dmraid          Libparted 2.3     Check and repair file system (ext3) on /dev/sda1  00:11:35    ( ERROR )          calibrate /dev/sda1  00:00:00    ( SUCCESS )          path: /dev/sda1     start: 2,048     end: 1,232,117,759     size: 1,232,115,712 (587.52 GiB)     check file system on /dev/sda1 for errors and (if possible) fix them  00:11:35    ( ERROR )          e2fsck -f -y -v /dev/sda1          ext2fs_check_desc: Corrupt group descriptor: bad block for block bitmap     e2fsck: Group descriptors look bad... trying backup blocks...     Block bitmap for group 4700 is not in group. (block 154014812)     Relocate? yes          Inode bitmap for group 4700 is not in group. (block 154014813)     Relocate? yes          Pass 1: Checking inodes, blocks, and sizes     Error allocating 1 contiguous block(s) in block group 4700 for block bitmap: Could not allocate block in ext2 filesystem     Error allocating 1 contiguous block(s) in block group 4700 for inode bitmap: Could not allocate block in ext2 filesystem          /dev/sda1: ***** FILE SYSTEM WAS MODIFIED *****          /dev/sda1: ********** WARNING: Filesystem still has errors **********          e2fsck 1.42.5 (29-Jul-2012)     e2fsck: aborted          ========================================      This is the output of `dmesg | tail`:               [ 1702.169848] EXT3-fs error (device sda1): ext3_check_descriptors: Block bitmap for group 4700 not in group (block 154014812)!     [ 1702.170231] EXT3-fs (sda1): error: group descriptors corrupted     [ 1889.324746] CPU3: Package power limit notification (total events = 50)     [ 1889.324749] CPU1: Package power limit notification (total events = 50)     [ 1889.324750] CPU2: Package power limit notification (total events = 50)     [ 1889.324752] CPU0: Package power limit notification (total events = 50)     [ 1889.335756] CPU2: Package power limit normal     [ 1889.335757] CPU3: Package power limit normal     [ 1889.335759] CPU1: Package power limit normal     [ 1889.335760] CPU0: Package power limit normal      How can I fix my partition? Will I be able to recover my data? **Edit:** Here are some additional commands I ran: **sudo fsck.ext3 -cf /dev/sda1**               e2fsck 1.42.5 (29-Jul-2012)     ext2fs_check_desc: Corrupt group descriptor: bad block for block bitmap     fsck.ext3: Group descriptors look bad... trying backup blocks...     Block bitmap for group 4700 is not in group.  (block 154014812)     Relocate<y>? yes     Inode bitmap for group 4700 is not in group.  (block 154014813)     Relocate<y>? yes     fsck.ext3: e2fsck_read_bitmaps: illegal bitmap block(s) for /dev/sda1          /dev/sda1: ***** FILE SYSTEM WAS MODIFIED *****      **sudo e2fsck -b 32768 /dev/sda1**               e2fsck 1.42.5 (29-Jul-2012)     Block bitmap for group 4700 is not in group.  (block 154014812)     Relocate<y>? yes     Inode bitmap for group 4700 is not in group.  (block 154014813)     Relocate<y>? yes     /dev/sda1 was not cleanly unmounted, check forced.     Pass 1: Checking inodes, blocks, and sizes     Error allocating 1 contiguous block(s) in block group 4700 for block bitmap: Could not allocate block in ext2 filesystem     Error allocating 1 contiguous block(s) in block group 4700 for inode bitmap: Could not allocate block in ext2 filesystem     e2fsck: aborted          /dev/sda1: ***** FILE SYSTEM WAS MODIFIED *****          /dev/sda1: ********** WARNING: Filesystem still has errors **********      **sudo parted -l**               Model: ATA Hitachi HTS54757 (scsi)     Disk /dev/sda: 750GB     Sector size (logical/physical): 512B/4096B     Partition Table: msdos          Number  Start   End    Size    Type     File system     Flags      1      1049kB  631GB  631GB   primary  ext3            boot      2      742GB   750GB  7985MB  primary  linux-swap(v1)               Warning: Unable to open /dev/sr0 read-write (Read-only file system).  /dev/sr0     has been opened read-only.     Error: Can't have a partition outside the disk!                                 The partition table entry states "msdos" - is this supposed to be like that?


title: Single window mode in xsane

text: Is it possible to use `xsane` in a single window mode (just like in `gimp` since version 2.8)? If it's not possible by default is there any compile option to achieve this?


title: Disable "Priveleged user popup" in fedora 8

text: Problem Statement :- Automatic Login as "root" in fedora 8. I tried with "/etc/gdm/config..." file . (working in linux) But in fedora 8 there is a pop up showing " Plz login as normal user ........" Is there any way of disabling this pop up so that I can get the desktop and start my application without pressing any key. I know it's a security issue but still i want to do it.


title: How to get dmidecode information without root privileges?

text: I'm writing a program that displays various system information (on a CentOS system). For example, the processor type and speed (from `/proc/cpuinfo`), the last boot time (calculated from `/proc/uptime`), the IP address (from `ifconfig` output), and a list of installed printers (from `lpstat` output). Currently, several pieces of data are obtained from the `dmidecode` program:   * The platform type (`dmidecode -s system-product-name`)   * The BIOS version (`dmidecode -s bios-version`)   * The amount of physical memory (`dmidecode -t17 | grep Size`) These are only available if my program is run as root (because otherwise the `dmidecode` subprocess fails with a `/dev/mem: Permission denied` error). Is there an alternative way to get this information, that a normal user can access?


title: How can I "merge" patterns in a single line?

text: I am doing grep and sed and I get 2 lines of a file that I am interested in. How can I get these lines in a single line ending with the new line character?   Now I am getting:               pattern1       pattern2        I would like to get `pattern1 pattern2 \n`


title: Does PPPoE connection have IP before authentication?

text: I am debugging a connectivity issue with my internet connection provider. I have a PPPoE type of connection. I am working on configuring my router to connect over PPPoE connection. Please note that I am re-configuring the same router which worked for the same connection so its not a router issue. I tried to connect the WAN line to my laptop and tried to configure pppd (running Arch Linux) What I am trying to understand is if the LAN interface should already have IP before I authenticate using PPPoE? I am not sure how PPPoE works, whether it gets an IP over normal DHCP and establishes a session using PPPoE or getting the IP is also part of PPPoE handshake? Currently, my LAN interface does not get any IP, before or after using ppp dial-up. I am trying to figure out if the WAN connection itself is down or is it just my misconfiguration. on ppp dial-up I am getting following error,               pppd[30235]: Timeout waiting for PADO packets     pppd[30235]: Unable to complete PPPoE Discovery


title: Debian GNOME 2.30, desktop does not respond anymore

text: I have Debian Wheezy with GNOME (2.30.2) installed on my computer and my problem is that my desktop does not work anymore. I can't right click on the desktop (to change wallpaper, etc...). Moreover, I don't see my files & folders on the desktop, however by using nautilus I can see that the Desktop folder still exists (and all his content). I don't know where to find the mistake I've certainly done. The steps I took:               apt-get install nautilus-share     apt-get update/upgrade


title: Why are incoming packets on a TAP interface seen with tcpdump but not with iptables?

text: A program injects packets on a Linux TAP interface (these packets are coming from a virtual machine). Specifically, these are DHCP requests (so they're UDP). I can see the packets with `tcpdump` but not with `iptables`, and they don't reach the local DHCP server either. Why not, and how do I fix that? **Update** : I tried injecting IP packets directed to the address of the `tap0` interface. I see the ARP requests coming in from the VM in `tcpdump -i tap0`, but the network layer does not reply. If I send ARP requests to the VM, it sees them and replies to the host (and the replies show up in `tcpdump` but are otherwise lost). Another observation: `ifconfig tap0` shows that the TX dropped packet count is incremented for each packet that's injected onto the host. Why TX?               # ifconfig tap0     …               TX packets:0 errors:0 dropped:958 overruns:0 carrier:0               collisions:0 txqueuelen:500               RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)      * * * _The long story:_ On a Linux host (running Ubuntu 10.04), I'm running a virtual machine which amongst other things emulates an Ethernet card. It does so by communicating with a helper program that's in charge of injecting and capturing Ethernet packets onto the hosts's network stack. The virtual machine is an ARM chip emulator, and the helper program is called `nicserver`; all I know about it is what is found in the ARM documentation. I want to establish an Ethernet link between the VM and the host, and above that I want an IP link. The VM obtains its IP address over DHCP. I do not want any communication between the VM and the rest of the world, only with the host, so I created a virtual network interface `tap0` with               tunctl -u gilles     ifconfig tap0 192.168.56.1 netmask 255.255.255.0 up     nicserver -p 7801 -a tap0 &      Now I boot the VM, and I can see it's sending DHCP requests with `tcpdump -n -i tap0 -vv` (the DHCP client doesn't time out, I'm just showing one sample request here):               tcpdump: listening on tap0, link-type EN10MB (Ethernet), capture size 96 bytes     18:29:23.941574 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto UDP (17), length 576)         0.0.0.0.68 > 255.255.255.255.67: [no cksum] BOOTP/DHCP, Request from 02:52:56:47:50:03, length 548, xid 0x238a7979, secs 46, Flags [none] (0x0000)               Client-Ethernet-Address 02:52:56:47:50:03 [|bootp]      I've set up Dnsmasq on the host to serve the requests, but it's not seeing any incoming request. The Dnsmasq server doesn't even see the incoming requests (I straced it). So I tried observing the packets with Iptables. (All the filter/INPUT rules are shown; there are no mangle or nat rules).               Chain INPUT (policy ACCEPT 2366K packets, 5334M bytes)      pkts bytes target     prot opt in     out     source               destination        119 39176 LOG        udp  --  *      *       0.0.0.0/0            0.0.0.0/0           udp dpt:67 LOG flags 4 level 4 prefix `[DHCP request] '       119 39176 DROP       udp  --  eth1   *       0.0.0.0/0            0.0.0.0/0           udp dpt:67         2   490 LOG        udp  --  tap0   *       0.0.0.0/0            0.0.0.0/0           LOG flags 4 level 4 prefix `[in=tap0] '        26  6370 ACCEPT     udp  --  tap0   *       0.0.0.0/0            0.0.0.0/0            0     0 ACCEPT     all  --  tap0   *       0.0.0.0/0            0.0.0.0/0         3864  457K ACCEPT     udp  --  *      *       0.0.0.0/0            0.0.0.0/0         All these incoming DHCP requests are on `eth1` (and I'm careful not to ignore these so as not to anger my colleagues and my network admin). Those UDP packets on `tap0` come from the local Samba server. The DHCP request packets that I see with tcpdump do not appear to go through the packet filter! Why do I see incoming broadcast packets on `tap0` with `tcpdump` but not with `iptables` (nor with programs listening on the machine)? And what do I need to fix so that these packets are seen, as they would be if they were coming on an Ethernet interface?


title: What is the difference between modify and change in stat command context?

text: The `stat` command's manual page says: > >        %x     Time of last access >        %y     Time of last modification >        %z     Time of last change >   I am unable to understand what is the difference between _modify_ and _change_. What I understand both are synonyms (English is not my mother tongue), but their output is different. I tried following command                stat --printf="Change %z\nAccess %x\nModify %y\n" p.txt      Now when I open p.txt, access time is changed, I go into insert mode, edit the file, modify and change time remains same. > Change 2010-10-06 12:48:39.286252389 +0500   >  Access 2010-10-06 12:49:14. **962243456** +0500   >  Modify 2010-10-06 12:48:39.234498878 +0500 When I write the changes to file `:w`, modify and change, both change but give different values. > Change 2010-10-06 12:51:21. **949082169** +0500   >  Access 2010-10-06 12:51:21.908246082 +0500   >  Modify 2010-10-06 12:51:21. **908246082** +0500 So what is the meaning of modify and change in this context? Time of modification and change give time of which event?   Thanks


title: Bind locally installed library

text: I have no root-acces on a machine and i'm trying to install a library called GiNaC locally in my home folder. I use this tutorial http://www.ginac.de/tutorial/Configuration.html#Configuration. At the end there is an example (dont need to disable the shared-library and i dont need a specific compiler). Unfortunatly if I do this               export CPPFLAGS="$(CPPFLAGS) -I$/home/xxx/include"     ./configure      this is the result...               ...     checking for g++... g++     checking whether the C++ compiler works... no     configure: error: in `/home/redies/ginac-1.6.2':     configure: error: C++ compiler cannot create executables     See `config.log' for more details      In config.log there is the line               CPPFLAGS='CPPFLAGS: command not found -I$/home/xxx/include'      Any ideas?


title: Why does my vim-7.3 compile fail to include clientserver?

text: I am trying to compile vim-7.3 will all features enabled. I ran configure with               $ ./configure --with-features=huge --enable-gui --enable-cscope     $ make ; make install      When I check the version, it shows several features are still not installed. > Huge version without GUI. Features included (+) or not (-): +arabic +autocmd > -balloon_eval **-browse** ++builtin_terms +byte_offset +cindent > **-clientserver -clipboard** +cmdline_compl +cmdline_hist +cmdline_info > +comments +conceal +cryptv +cscope +cursorbind +cursorshape +dialog_con > +diff +digraphs -dnd -ebcdic +emacs_tags +eval +ex_extra +extra_search > +farsi +file_in_path **....** Now according to vimdoc   > N _+browse_   >  N _+clientserver_ It says > Thus if a feature is marked with "N", it is included in the normal, big and > huge versions of Vim. `features.h` also says > +huge all possible features enabled. According to the above mentioned two resources, `huge` means all features are enabled. Even if not all, then at least `+clientserver` and `+browse` has to be enabled in `huge` compilation mode. But my experience says otherwise. Huge compilation fails to include browse and clientserver feature.   1. Why is it so? Is my understanding of the document is incorrect?     2. How to enable clientserver feature?     3. How to enable gui?     4. Is it possible to enable **all** features simply? I tired huge as `features.h` suggested it will enable all possible features, but it didn't work. Thanks for your time. # Edit: Problem solved! Thanks to all of you guys for your priceless help.   I checked, `vim73/src/auto/config.log`, it was clear that lots of dependencies are missing. Gert post gave an idea which packages are required. I used:               $ yum -yv install libXt.i686 libXt-devel.i686 \     libXpm.i686 libXpm-devel.i686 \     libX11.i686 libX11-common.noarch libX11-devel.i686 \     ghc-cairo-devel.i686  cairo.i686   \     libgnomeui-devel.i686 \     ncurses.i686 ncurses-devel.i686  ncurses-libs.i686 ncurses-static.i686 \     ghc-gtk-devel.i686 gtk+-devel.i686 \     gtk2.i686  gtk2-devel.i686 \     atk-devel.i686 atk.i686 \     libbonoboui.i686 libbonoboui-devel.i686       Some of the packages were already installed, others were not. After that:               $ ./configure --with-features=huge --enable-cscope --enable-gui=auto     $ make ; make install      Now my vim has all the packages associated with `huge`. > Huge version with GTK2 GUI. Features included (+) or not (-):   >  +arabic +autocmd +balloon_eval +browse ++builtin_terms +byte_offset > +cindent   >  **+clientserver** +clipboard +cmdline_compl +cmdline_hist +cmdline_info > +comments   >  +conceal +cryptv +cscope +cursorbind +cursorshape +dialog_con_gui +diff   >  +digraphs +dnd -ebcdic +emacs_tags +eval +ex_extra +extra_search +farsi   >  **...** Thanks


title: How are file permissions calculated?

text: Using `chmod` I could set the permissions for a file, but if the parent ( `..` ) directory had conflicting permissions, what would happen? And if I create a new file, using `touch` or something similiar, how are the initial permissions calculated? Are permissions inherited it from `..`? And why can't I do anything in directory when I removed the `executable` permission flag?               $ mkdir temp;     $ chmod -x temp;     $ touch temp/a;     $ ls temp;     touch: cannot touch `temp/a': Permission denied


title: Linux find Wifi Networks trotocol(a/b/g/n) version of all available access points

text: I do use `iwlist wlan0 scanning` and it gives me a fair amount of data, but one part is missing. It is protocol version. By protocol I mean (a/b/g/n). It would be very good to have these commands in standard distro. I am using OpenWRT.


title: Create a File with Touch on a specific Directory

text: I want a create a file with a specific extension(.done). I am using the command touch. Something Like:               touch `basename $UNZIPFILE`".done"       It's creating the file but in current directory. I want to create this file in a specific directory. Is there a option to provide the directory ? I checked : http://ss64.com/bash/touch.html , but could not figure out. I can think of one option is before this command I can do a `cd requiredDIR` Is there any other way, I can specify the Directory on the same command, so that I dont have to change the Directory?


title: How to `tee` dropping all CR lines only in the file but not stdout?

text: When using e.g. `rsync`, I'd like to `tee` its output such that I can both view the current progress live, and have a log for later. Using just piping `| tee logfile` the logfile will contain many lines à la               0 files...<CR>     100 files...<CR>     200 files...<CR>      Where the carriage-return `<CR>` is used to have the live output replace the current line. For the `stdout` part of `tee` this is exactly the desired behavior, but is there any way to have the logfile drop anything between a `<CR>` and the last `<LF>`? (I'm not asking for a `rsync` specific answer, that's just the example!) Maybe some `sed`-piping in between?


title: How could I make multiple symbolic links for multiple directories, conveniently

text: lrwxrwxrwx  1 deploy users    20  1월 23 18:15 v122 -> /home/files/video122     lrwxrwxrwx  1 deploy users    20  1월 23 18:15 v123 -> /home/files/video123     lrwxrwxrwx  1 deploy users    20  1월 23 18:15 v124 -> /home/files/video124     lrwxrwxrwx  1 deploy users    20  1월 23 18:15 v125 -> /home/files/video125     lrwxrwxrwx  1 deploy users    20  1월 23 18:15 v126 -> /home/files/video126     lrwxrwxrwx  1 deploy users    20  1월 23 18:15 v127 -> /home/files/video127     lrwxrwxrwx  1 deploy users    20  1월 23 18:15 v128 -> /home/files/video128     lrwxrwxrwx  1 deploy users    20  1월 23 18:15 v129 -> /home/files/video129     lrwxrwxrwx  1 deploy users    20  1월 23 18:15 v130 -> /home/files/video130     lrwxrwxrwx  1 deploy users    20  1월 23 18:15 v131 -> /home/files/video131     lrwxrwxrwx  1 deploy users    20  1월 23 18:15 v132 -> /home/files/video132     lrwxrwxrwx  1 deploy users    20  1월 23 18:15 v133 -> /home/files/video133     lrwxrwxrwx  1 deploy users    20  1월 23 18:15 v134 -> /home/files/video134     lrwxrwxrwx  1 deploy users    20  1월 23 18:15 v135 -> /home/files/video135     lrwxrwxrwx  1 deploy users    20  1월 23 18:15 v136 -> /home/files/video136     lrwxrwxrwx  1 deploy users    20  1월 23 18:15 v137 -> /home/files/video137      These are symbolic links.   If new `video138 ~ video150` volumes are mounted, I have to make `links v138~v150` of that.   Could you imagine a bash magic? (I tried to use `brace expansion` but couldn't make it work.)   It would be much better if the magic script can create the symlinks automatically, with detecting the volumes' mount.


title: How to power off a system but still keep it available on the network

text: I'm looking into installing a file server on my network, for serving data and backups. I want this machine to be available at all times, but I would rather not keep it on all the time (as to conserve power). Is it possible to set things up so that the thing automatically suspends (or powers off) after some time and then automatically powers back on when I try to connect to it (using some wake-up on LAN magic, without having to send explicit WOL packets)?


title: Could you share a link to a good catalogue of Linux distros to choose?

text: > **Possible Duplicate:**   >  How do you choose a distribution? I'd like to see a list of all the Linux distros by their mission (like generic, firewall, mail server, free-only, enterprise, virtual machines host, virtual machine guest, audio production, etc.) with basic description and analytics (like first release date, package management system, development activity, people behind the distro (like core team size or, for example "Canonical corporation" for Ubuntu) release cycle description, popularity, etc.). Where can I find such a catalogue? I've tried distrowatch.com, but couldn't find any classification there. I'd like to be able, for example, to see "all the distros meant specially for a firewall (or a LAMP server) deployment", or "all the distros available as LiveCDs" etc.


title: How does fcron knows whether the job was run?

text: I recently migrated from vixie-cron to fcron on my laptop. I have a question: how does fcron knows if a particular job was run in given period of time? As a file can change during running, what constitute a different job? if I change for example from running daily to weekly, will it be re-run?