Puppet. Firewall module syntax

What mean "->" in puppetlabs examples on this page ![enter image description here](http://i.stack.imgur.com/PLvWW.png)


How do I access the Lubuntu menu in Openbox?

Is there a way to include the Lubuntu applications menu in an Openbox menu (`~/.config/openbox/menu.xml`) so I can use it within a pure Openbox session?


Unable to install ia32-libs in Debian Wheezy

I was trying to install ia32-libs in Debian Wheezy. I got the error               The following packages have unmet dependencies:      ia32-libs : Depends: ia32-libs-i386 but it is not installable     E: Unable to correct problems, you have held broken packages.      I am using               # uname -a     Linux debian 3.2.0-4-amd64 #1 SMP Debian 3.2.41-2 x86_64 GNU/Linux      My sources.lst is               # cat /etc/apt/sources.list     #           # deb cdrom:[Debian GNU/Linux 7.0.0 _Wheezy_ - Official amd64 DVD Binary-1 20130504-14:44]/ wheezy contrib main          # deb cdrom:[Debian GNU/Linux 7.0.0 _Wheezy_ - Official amd64 DVD Binary-1 20130504-14:44]/ wheezy contrib main          deb http://security.debian.org/ wheezy/updates main contrib     deb-src ftp://ftp.iitm.ac.in/debian/ wheezy/updates main contrib          # wheezy-updates, previously known as 'volatile'     # A network mirror was not selected during install.  The following entries     # are provided as examples, but you should amend them as appropriate     # for your mirror of choice.     #     deb http://ftp.debian.org/debian/ wheezy-updates main contrib     deb http://http.us.debian.org/debian/ wheezy contrib non-free main     # deb-src http://ftp.debian.org/debian/ wheezy-updates main contrib     deb http://ftp.us.debian.org/debian stable main contrib non-free     deb http://security.debian.org/ wheezy/updates main contrib non-free


tmux with iterm2 attach a remote session

I'm using the Tmux integrating with ITerm2, which can create a tab in ITerm 2 for each window created by Tmux. But somehow this doesn't make much sense for the usual SSH scenario, where we first SSH to a remote host and work with multiple windows through Tmux. I want to have multiple tabs in ITerm 2, sharing one SSH connection, and in one Tmux sesson. Is it possible?


How to open all the files in a directory, using terminal, in emacs?

I've 4 java files in a directory, which I want to work with in emacs. How do I open them all with one command?


Unable to modify log level in samba

`log level` is present and set to three. However I don't see it when I do a `testparm` and I get next to no logs (I can see restarts and about it not being able to connect to `cupsd`) which doesn't seem like `log level` is anywhere close to three, but nothing more shows up regardless of what `log level` is set to in `smb.conf`. This isn't a terribly complicated problem but I can't figure out a way around it.


File containing ext filesystem

Let's suppose I create a file, map it to `/dev/loop0`, and create a LUKS partition inside               dd if=/dev/zero of=myfile bs=1M count=1000     losetup /dev/loop0 myfile      cryptsetup -c aes-cbc-essiv:sha256 -s 256 -v -y luksFormat /dev/loop0      I then open the encrypted partition               cryptsetup luksOpen /dev/loop0 myfile      Now, I have my encrypted file appear as a disk `/dev/mapper/myfile`. I need to create a filesystem before I can use it. Here is my question. Are there any default options with ext4 filesystem, that I should change to make my setup optimal? My presumption is, that ext4 is expected to be used on HDD which are substantially bigger than my 1GB file. I am therefore wondering whether I should adjust some options Also, I am no sure whether or not it makes sense to use journal inside a file (this file is already stored on a ext4 filesystem with journal) Usually, the default options are:               $ tune2fs -l /dev/mapper/sda5 | grep 'Filesystem features'     Filesystem features:      has_journal ext_attr resize_inode dir_index filetype needs_recovery extent flex_bg sparse_super large_file huge_file uninit_bg dir_nlink extra_isize


incorrect lines display in ssh console

I have problem with my console drawing lines. The problem is when I connect through ssh to server everything draws ok. But when I use up arrow key to show last used commands it often leaves few characters after `$` sign:               user@host:~$ cd /var/www_vhosts/     user@host:/var/www_vhosts$ ls -la instalator-paczek/     razem 16     drwxrwxr-x  3 root        root       4096 02-20 10:48 .     drwxr-xr-x 13 root        root       4096 05-17 11:11 ..     -rwxrw-r--  1 root        developers 3380 05-29 11:03 instalator-paczek.sh     drwxrwxr-x  2 user developers 4096 05-29 11:03 logi     user@host:/var/www_vhosts$ cd instalator-paczek/     user@host:/var/www_vhosts/instalator-paczek$ nano instalator-paczek.sh      user@host:/var/www_vhosts/instalator-paczek$ cp -r inst     user@host:/var/www_vhosts/instalator-paczek$ nano /etc/issue     user@host:/var/www_vhosts/instalator-paczek$ uname     Linux     user@host:/var/www_vhosts/instalator-paczek$ uname -a     Linux host 2.6.32-5-amd64 #1 SMP Sun Sep 23 10:07:46 UTC 2012 x86_64 GNU/Linux     user@host:/var/www_vhosts/instalator-paczek$ cat /etc/issue     Debian GNU/Linux 6.0 \n \l     # here I use up arrow key to display last used commands and everything is ok until it show last: "cp -r in..." command     # "cp -r inst" is shown and next last used commands are shown after those 10 characters. I displays them like:     # $ cp -r instls -la     # $ cp -r instcd directory      # etc.     # I tried using backspace but it clear characters just until "cp -r inst", not even one more     # prompt is shown correctly only after i press enter or ^C     user@host:/var/www_vhosts/instalator-paczek$ cp -r instnano /etc/issue      user@host:/var/www_vhosts/instalator-paczek$ ls     instalator-paczek.sh  logi      What is even more irritating is what happens when I type more characters than console width. Cursor somehow goes back to the beginning of line and overwrites prompt:               /d/asd/as/d/asd/asd/as/d/asd/asdww_vhosts/instalator-paczek$ ls -la asdkasdasdasd/asdasdasd/asdasdasdasdasdas/dasdsdaas/d/asd/as/d/asd/as      I can't use any long commands because it overwrites beginning and I can't see if I typed everything correctly. Long command when pasted inside console works even if display is corrupted. It's like only display is corrupted but command itself is ok. I have ubuntu 12.10 and use `Konsole` as console application. On server there is `Debian GNU Linux 6.0` and xterm.               user@host:/var/www_vhosts/instalator-paczek$ echo $TERM     xterm      It only happens with this server other servers I connect works good with `Konsole`. How to fix this? ### EDIT Is this possible that those errors are occurring because there is no `xterm` installed on server and there is no resize command?               user@host:~$ stty -a     speed 38400 baud; rows 57; columns 151; line = 0;     intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>; eol2 = <undef>; swtch = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R;     werase = ^W; lnext = ^V; flush = ^O; min = 1; time = 0;     -parenb -parodd cs8 -hupcl -cstopb cread -clocal -crtscts     -ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl ixon ixoff -iuclc -ixany -imaxbel -iutf8     opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0     isig icanon iexten echo echoe echok -echonl -noflsh -xcase -tostop -echoprt echoctl echoke     user@host:~$ stty -a     speed 38400 baud; rows 57; columns 172; line = 0;     intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>; eol2 = <undef>; swtch = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W; lnext = ^V;     flush = ^O; min = 1; time = 0;     -parenb -parodd cs8 -hupcl -cstopb cread -clocal -crtscts     -ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl ixon ixoff -iuclc -ixany -imaxbel -iutf8     opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0     isig icanon iexten echo echoe echok -echonl -noflsh -xcase -tostop -echoprt echoctl echoke      It seems like resizing console window also changes `stty`. **EDIT2** I've installed `xterm` package on server. I've logged out and log in again but problem is still the same. Should I restart server after installing `xterm` or something?


Solarized color definitions in vimrc file

The solarized theme defines some base colors and assigns those to variables, as seen here. I would like to know how I can use these color definitions in my `.vimrc` file. Currently, I use pathogen to load solarized and it is loaded with a simple `syntax enabled` and `colorscheme solarized`, but when I want to reference e.g. `s:base00` in my `.vimrc` file, I get an error:               E421: Color name or number not recognized: ctermfg=s:base00


Cannot "resume" music

I've had the following issue across multiple music players and multiple distro's. Currently I am experiencing it in Rhythmbox on Arch Linux. Whenever I play music and then pause a track I am unable to resume it, it simply seems to "stay paused". However when I manually skip ahead in a track it works just fine. Similarly my music seems to stop playing slightly before the end of a trakc and then just "stops", I have to manually skip to the next track. My sound is coming through a port in my monitor, which receives the sound via the HDMI cable. However I've also tried the audio jack coming straight from the motherboard with the same results. Any ideas why this might be happening? Edit: additional info as requested: `rhythmbox -d` log: http://pastebin.com/rueUaNMZ (relevant entries appear to start at line 2017, nothing of value that I can see though). I opened Rhythmbox, pressed play, pressed pause, pressed play again (didnt work) then closed Rhythmbox. Hardware info:               **** List of PLAYBACK Hardware Devices ****     card 0: PCH [HDA Intel PCH], device 0: ALC888-VD Analog [ALC888-VD Analog]       Subdevices: 1/1       Subdevice #0: subdevice #0     card 0: PCH [HDA Intel PCH], device 1: ALC888-VD Digital [ALC888-VD Digital]       Subdevices: 1/1       Subdevice #0: subdevice #0     card 0: PCH [HDA Intel PCH], device 3: HDMI 0 [HDMI 0]       Subdevices: 1/1       Subdevice #0: subdevice #0      I've tried both `ALC888-VD Analog` and `HDMI 0` It does nothing at all when I press play, nothing happens UI wise or audio wise. Long or short pause does not make any difference. I am using `pulseaudio-alsa` (Arch Linux).


How can I configure postfix to send mail from my domain?

I currently have a VPS set up with postfix and dovecot, running on a mail server located at `mail.noelforte.com`. The setup works fine for receiving mail, as whenever mail is sent to `@noelforte.com`, the MX records point the mail to my mail server and I can receive it. How can I configure postfix to send mail from `noelforte.com`, and not `mail.noelforte.com`, while still routing mail through the `mail.noelforte.com` server so it can be authenticated via SSL?


X Server won't load when I add a 50-synaptics.conf file inside the xorg.conf.d directory

I'm using Fedora 18. I'm trying to configure my synaptics touchpad, I need the tapping and the horizontal scrolling inside Awesome Window Manager. I've created a file at `/etc/X11/xorg.conf.d/50-synaptics.conf` with the following contents:               Section "InputDevice"             Identifier "touchpad"             Driver "synaptics"             MatchIsTouchpad "on"             Option "HorizEdgeScroll" "on"     EndSection      But when I start the system, it hangs at different points, one that I saw frequently is :               Failed to start Wait for Plymouth Boot Screen to Quit.     See 'systemctl status plymouth-quit-wait.service' for details.      If you want a log file or something just tell me how to get it.


Recommendation on filesystem for embedded device - RAM or USB

It's been 4 years since I stopped working on my Linux internet radio box. My Linux box was Ubuntu 6.04 with Ext3 fs. At user-space, everything works perfectly except I occasionally bumped into corrupted fs issue if I disconnect the USB forcefully. I'd love to hear recommendations from experts on which fs would suits my case. I also heard about compress the whole system into a file then uncompress them during bootstrap phase, then again I am clueless and really appreciate if someone could point me to right direction. Many thanks.


Why does pulseaudio handle the sound quality connection to a BT device?

I'm new to Linux and new to Bluetooth scripting too. What I have discovered so far is the following:   1. Bluez is the default BT stack.    2. BluezTools is a set of utilities you can use to more easily interact with Bluez   3. DBus is the interface Bluez connects to while interacting directly with the hardware.    4. PulseAudio is the subsystem responsible for producing audio on the system.  This makes sense. So let's say I have a set of BlueTooth headphones, what I would expect is (all after pairing and trusting), to be able to issue a command that can connect directly to a certain profile on the BT headphones. The technical path I have in mind would be something like :   1. Turn headphones on.    2. Issue a BluezTools command - such as **bt-audio -c**   3. Wait for the device to connect to the service I am after   4. PulseAudio should now pick up a new output device   5. Issue another command to change the audio from what it was to new output audio (the BT headphones).    6. Enjoy a seamless listening experience.  This all seems logical, but the actual implementation is not like this, and I am looking for the WHY, so I can better understand the problem and try and fix it. This is what actually happens:   1. Turn headphones on.    2. Issue a BluezTools command - such as **bt-audio -c**   3. Wait for the device to connect to the service I am after   4. PulseAudio should now pick up a new output device   5. Issue a PulseAudio command to change the audio profile from telephone quality to high fidelity.  Let me expand on this a bit. The bluetooth headset offers 2 quality modes (telephone and high fidelity). Only 1 is really suitable for listening to music. I would expect that the BT headphones expose each quality mode as a service, is this right? This assumption could be wrong, but I would expect something like **bt-audio -c highFidelityProfile** or **bt-audio -changeProfile highFidelityProfile** Instead it seems that Bluez just handles the RAW connection to the device, and from there you need to issue a : **pacmd set-card-profile $INDEX a2dp** This just seems fundamentally wrong. Why is the quality control in the audio subsystem, hence requiring a different implementation for pulse or alsa, or any other sound sub system out there? What am I missing? Why is it not possible to connect directly to a certain profile using Bluez / BluezTools etc?


Debian 6: Can ping default gateway, but not the IP address of any server on the Internet. Routes appear OK

I can't connect to the Internet from our server. I'm able to ping the default gateway, LAN connectivity works fine but I can't ping any public IP (say, 4.2.2.1, an open DNS server which I know replies to ping). When I do a traceroute, I don't even see the first hop. The configuration SEEMS to be fine (I'm no Linux expert, I might be missing something). I have the server's IP address set via DHCP, but the MAC address is bound to the IP. I wanted to see if that helped, but no:               root@linux:/home/user# ifconfig     eth0      Link encap:Ethernet  HWaddr b8:ac:6f:95:94:f4                 inet addr:192.168.0.150  Bcast:192.168.0.255  Mask:255.255.255.0               inet6 addr: fe80::baac:6fff:fe95:94f4/64 Scope:Link               UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1               RX packets:1223325 errors:0 dropped:146 overruns:0 frame:0               TX packets:974313 errors:0 dropped:0 overruns:0 carrier:0               collisions:0 txqueuelen:1000                RX bytes:983138831 (937.5 MiB)  TX bytes:742552277 (708.1 MiB)               Interrupt:16           lo        Link encap:Local Loopback                 inet addr:127.0.0.1  Mask:255.0.0.0               inet6 addr: ::1/128 Scope:Host               UP LOOPBACK RUNNING  MTU:16436  Metric:1               RX packets:5290 errors:0 dropped:0 overruns:0 frame:0               TX packets:5290 errors:0 dropped:0 overruns:0 carrier:0               collisions:0 txqueuelen:0                RX bytes:454378 (443.7 KiB)  TX bytes:454378 (443.7 KiB)      * * *               root@linux:/home/user# cat /etc/network/interfaces     # This file describes the network interfaces available on your system     # and how to activate them. For more information, see interfaces(5).     # The loopback network interface     auto lo     iface lo inet loopback     # The primary network interface     allow-hotplug eth0     auto eth0     iface eth0 inet dhcp      * * *               root@linux:/home/user# cat /etc/resolv.conf      domain REMOVED     search REMOVED     nameserver 4.2.2.1      * * *               root@linux:/home/user# ip route     192.168.0.0/24 dev eth0  proto kernel  scope link  src 192.168.0.150      default via 192.168.0.1 dev eth0


Tell fs to free space from deleted files NOW

Is there a way to tell the kernel to give back the free disk space now? Like a write to something in /proc/ ? Using Ubuntu 11.10 with ext4. This is probably an old and very repeated theme. After hitting 0 space only noticed when my editor couldn't save source code files I have open, which to my horror now have 0 byte size in the folder listing, I went on a deleting spree. I deleted 100's of MB of large files both from user and from root, and did some hardlinking too. Just before I did `apt-get clean` there was over 900MB in /var/cache/apt/archives, now there is only 108KB:               # du     108 /var/cache/apt/archives      An hour later still no free space and cannot save my precious files opened in the editor, but notice the disparity below:               # sync; df     Filesystem           1K-blocks      Used Available Use% Mounted on     /dev/sda4             13915072  13304004         0 100% /      Any suggestions? I shut off some services/processes but not sure how to check who might be actively eating disk space. More info               # dumpe2fs  /dev/sda4     Filesystem state:         clean     Errors behavior:          Continue     Filesystem OS type:       Linux     Inode count:              884736     Block count:              3534300     Reserved block count:     176715     Free blocks:              422679     Free inodes:              520239     First block:              0     Block size:               4096     Fragment size:            4096


Server pinning one core

I'm working on a server using Vert.x in Java and I'm noticing some performance problems when running on a dedicated server running Ubuntu 12.04. The server picks up the incoming HTTP requests, does some authentication using HMACs, parses the request bodies, does some text processing, and sends data out to a different server over UDP. There's no disk I/O, and only a relatively small amount of memory usage (nowhere close to swap). I'm doing loadtesting against the server using Grinder and AWS instances, but even with a well- geared server I'm unable to get more than 10k requests per second. What I'm seeing is that one core on the server machine is absolutely pinned, mostly in the kernel, and the other cores are only at ~20-25% utilization. My assumption is that the CPU is being spent on receiving incoming TCP connections. JMX reports most of my time in io.netty.channel.nio.NioEventLoop.select(), which I assume counts time waiting for the kernel, and strace shows a lot of time spent in futex() and epoll_wait(). I've tried playing with kernel settings to increase the throughput of the server, but I haven't had any luck. Profiler run: ![ss of profiler](http://i.stack.imgur.com/6wIZA.png) _original URL:http://i.stack.imgur.com/6wIZA.png_ CPU usage: ![ss of usage](http://i.stack.imgur.com/9mM5u.png) _original URL:http://i.stack.imgur.com/9mM5u.png_ I'm wondering what can be tuned at the kernel level to help with this. I've tried messing with TCP buffer sizes, increasing file handles, turning off TCP features, etc., to no avail. If it helps, this server OS is actually running on Xen, it's 'dedicated' in that it's the only resident.


Help understanding an egrep expression

I stumbled across the following egrep expression:               egrep '^([^aieou]*[aieou]){5,7}[^aieou]*$' /usr/share/dict/words      on this page: http://matt.might.net/articles/sculpting-text The expression is supposed to find the words that contain between 5 and 7 vowels. I understand the first ^ meaning from the beginning of the line and the second ^ to negate any of the aieou followed by any number of characters and one of the aeiou between 5 and 7 times. But I did not get how the first and last expressions: `[^aieou]` help here?


Can GNOME/KDE be turned off?

I have installed Debian Wheezy on an old laptop I want to use as a server. However, sometimes I want to use that computer to read webpages and write some code on it. So I want to have a GUI where I can install a web browser. I want to have either KDE or GNOME on it. Is it possible to install a GUI that you can start with a command and stop again? The reason why I want this is to save resources when the server is only used as a server. It's an old laptop and doesn't have very much power.


more than 8 outputs detected -- how to solve?

I have installed `Ubuntu 12.04.3` LTS on the notebook Lenovo IdeaPad z510. Setup was successful. But when I tried to load Ubuntu it gets an error: " **more than 8 outputs detected** ". When I googled about this error, it says this error is related to the Intel Graphics driver, but I am not sure how to resolve this problem.


Command line options of rackup are not shown in ps output or procfs

As you know if you wish to get command-line runtime arguments for running command you can parse `ps -e` or `/proc/<pid>/cmdline`. But I have encountered issue when this method returns only command with path but without arguments. For example:               $ rackup private_pub.ru -s thin -E production          Thin web server (v1.5.1 codename Straight Razor)     Maximum connections set to 1024     Listening on 0.0.0.0:9292, CTRL+C to stop          $ ps -e | grep rackup          16226 ttys001    0:02.19 /home/user/.rvm/gems/ruby-1.9.3-p429@gearup/     bin/rackup            $ xargs -0 echo < /proc/16226/cmdline          /home/user/.rvm/gems/ruby-1.9.3-p429@gearup/bin/rackup      There are no `private_pub.ru` and subsequent arguments. Can `rackup` "swallow" options and make them invisible to `ps`? What is reason for this behavior? My main issue is to find certain process with certain argument with `ps` or `procfs`. Output for `strace -rf -e trace=process rackup`               0.000000 execve("/home/user/.rvm/gems/ruby-1.9.3-p385@global/bin/rackup", ["rackup", "private_pub.ru", "-s", "thin", "-E", "production"], [/* 89 vars */]) = 0          0.003323 arch_prctl(ARCH_SET_FS, 0x7f1f1b1b1740) = 0          0.001193 execve("/home/user/.rvm/gems/ruby-1.9.3-p385@gearup/bin/ruby_noexec_wrapper", ["ruby_noexec_wrapper", "/home/user/.rvm/gems/ruby-1.9.3-p"..., "private_pub.ru", "-s", "thin", "-E", "production"], [/* 89 vars */]) = 0          0.002065 arch_prctl(ARCH_SET_FS, 0x7f04829a8740) = 0          0.001028 execve("/home/user/.rvm/gems/ruby-1.9.3-p385@gearup/bin/ruby", ["ruby", "/home/user/.rvm/gems/ruby-1.9.3-p"..., "/home/user/.rvm/gems/ruby-1.9.3-p"..., "private_pub.ru", "-s", "thin", "-E", "production"], [/* 89 vars */]) = -1 ENOENT (No such file or directory)          0.000294 execve("/home/user/.rvm/gems/ruby-1.9.3-p385@global/bin/ruby", ["ruby", "/home/user/.rvm/gems/ruby-1.9.3-p"..., "/home/user/.rvm/gems/ruby-1.9.3-p"..., "private_pub.ru", "-s", "thin", "-E", "production"], [/* 89 vars */]) = -1 ENOENT (No such file or directory)          0.000286 execve("/home/user/.rvm/rubies/ruby-1.9.3-p385/bin/ruby", ["ruby", "/home/user/.rvm/gems/ruby-1.9.3-p"..., "/home/user/.rvm/gems/ruby-1.9.3-p"..., "private_pub.ru", "-s", "thin", "-E", "production"], [/* 89 vars */]) = 0          0.005911 arch_prctl(ARCH_SET_FS, 0x7f4c84595740) = 0          0.013703 clone(Process 9182 attached     child_stack=0x7f4c845c1fb0, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0x7f4c845c29d0, tls=0x7f4c845c2700, child_tidptr=0x7f4c845c29d0) = 9182          >> Thin web server (v1.5.1 codename Straight Razor)     >> Maximum connections set to 1024     >> Listening on 0.0.0.0:9292, CTRL+C to stop


Script using CURL to add information to site every month

I am very new at bash, so forgive me for the novice question. Here is my curl call:               curl -d 'username=cdaniels&wallclock=391324502' 'https://www-dev.***.***.edu/clusterusage/rest/update.html';      which pulls from a file `~/qacct.monthly` with the format               Total    : OWNER         WALLCLOCK         UTIME         STIME           CPU             MEMORY                 IO                IOW     Total    : ==========================================================================================================================     Total    : cdaniels      391324502         0.195         0.066         0.261              0.000              0.007              0.000     Total    : jlinger               1         0.039         0.056         0.095              0.000              0.000              0.000     Total    : lbsome         18707336  18675574.761     21433.535  18697008.296       10604793.658           5527.986              0.000      The example only pulls one of the users, but I want it to parse through the information and pull all the usernames and wallclock information from all the users on the cluster for that month. I'm wanting to put this into a script so that it executes every month (obviously through a cron job)


Applications' tray icons aren't displayed in Linux Mint 17 on Cinnamon

I've installed Linux Mint 17 with Cinnamon. I tried to make GNote, Thunderbird and Skype autorun on system startup minimized to tray. I made them autoruned with `Startup application` program. Then I made GNote and Skype minimize into tray with their menu settings. And I had to install a couple of add-ons(`MinimizeToTray revived` and `firetray`. because the former didn't work) on Thinderbird to make it minimizable to tray. After that at first it worked first time but then a strange bug appeared. Every time I minimize one of these programs to tray or they are minimized with startup their tray icons don't appear. They appear to be working in processes list, but no tray icon and no icon on panel as well. So it actually gets to tray but no icon appears on the other hand. Is there any way explain it and repair the tray? Tray worked but then it got broken in that way.


on puppy linux, how to manage power settings

I'm new to using Puppy Linux, and I'm not able to find a way to manage power settings. The laptop stops working everytime I close and re-open the lid so I want to disable that function from doing anything.


How to kill all open windows?

I want to close all windows appearing on my desktop. I've thought to do this through `pkill`, but I could only manage to kill them one at a time, which is not what I want. The end goal is to put this into a script to run a kiosk, it will detect if the kiosk software is running (I figured this part out) and if it is not, then it will kill any windows that are open, and restart my kiosk software.


Call the script after disconnecting from server

I have a script I made for work that will call a function that takes an argument. I use the arguments to `ssh` into our servers. My question is: Is there a way to call the method so that if/when I get disconnected from our servers, It will automatically call the script? So for example, I can `ssh` into one of our servers. We have a `reverse-ssh` tunnel set up so after an hour the connection closes. I want it so that after the disconnection, the script will be called again prompting for a hostname.               #!/bin/bash     echo "Provide hostname: "     read host          createSSHFunction()     {         arg1=$1         ssh $host     }     createSSHFunction $host


Differences between XStow and Stow

According to the official XStow news, the package was last updated on 2010-07-22. On the other hand, the GNU Stow git repository (mantained by Adam Spiers) had activity just 10 days ago, and the latest stable version came out on Feb. 18, 2012. Most of the information I can find online about the differences between Stow and XStow dates from many years ago, and does not seem to reflect any of the recent changes. With this, what is a modern look at the differences between GNU Stow and XStow?


Is there a working H.265 encoder implementation available for Linux?

I've read that the new H.265 video encoding algorithm can encode the same video with same quality in about 2 times smaller bitrate. Obviously I'd like to encode all my videos with this algorithm to get more free HDD space. Is this possible already with free tools available for Linux?


Does "226 Transfer complete" guarantee the consistency between local and remote files when using ftp?

I have some automated scripts which perform FTP uploads among other things. I'm wondering what level of error checking I should conduct once these uploads have finished executing. Could anything go wrong uploading a file when it reports `"226 Transfer complete"` which would warrant extra tests, besides checking for this string in the log, to check if a file was successfully uploaded?


snmp/snmptrap support of ipv6

I have IPv6 only (not dual stack) system I wondering how to   \- send snmptrap from this system? \- configure snmpd to be able to access it? I mean, is snmp is ready to use in IPv6 only environment?


If computers start counting at 0, why does the init process have a pid of 1?

Not much to put here in the body, the question is self explanatory.


KSH conventions scripting

I'm writing scripts in `ksh` atm. I'd like to know if there is any "conventions" as for example, always doing "unset" before using a variable, or using typeset to define a new variable, etc.


Check for existence of files prior to acting on them

In one of my processes I check for existence of files older than 31 days, and then do stuff with them.               find /my/directory/*txt -mtime +31 -exec ls -l {} \;      All this is well and fine if files are in `/my/directory/`, but when there are no files present I get an error:               find: `/my/directory/*txt': No such file or directory      If I issue:               touch /my/directory/a_new_file.txt      and run the same command again               find /my/directory/*txt -mtime +31 -exec ls -l {} \;      There are no errors. Is there a way to verify that files exist in a directory before attempting any work on them?


3 monitors on 2 separate nvidia cards with compositing and rotation

Is this even possible? I've got 3 monitors (#1, #2, and #3) and 2 video cards (A and B). #1 and #2 are connected to video card A, and #3 is connected to B. I want to rotate monitors #2 and #3, and keep #1 between them (so it will look a bit like an H). I'd like to be able to move windows between them freely and I'd like compositing. Is there any way I can do this using xrandr? That seems like what everyone is telling me to use, but I can't get it to work right. What should I do to get this to work? EDIT: Supposedly xrandr 1.4 can do this. I'm going to look into it more.


How to get all ldap groups for a user

I have no direct access to LDAP, but I am a user in LDAP and can make queries using ldapsearch. How can I query LDAP to get all LDAP groups for a particular user? Also is there an easy way to get LDAP group names from the gid attribute? I am a beginner when it comes to ldapsearch so go easy please!


Configuring Real VNC on RHEL 6.3 Command Line

I am trying to setup real vnc server on my RHEL via command line. I have done the following steps   1. Downloaded the Real VNC installer from Real VNC for Red Hat 64 bit system   2. Unizipped it to get to rpms VNC-Server-5.0.5-Linux-x64.rpm,VNC-Viewer-5.0.5-Linux-x64.rpm   3. The documentation did not have any command line installation instructions   4. Followed the instructions given in this forum   5. `rpm VNC-Server-5.0.5-Linux-x64.rpm -i`   6. `vnclicense -add <KEY>`   7. `netstat -an | more`              tcp        0      0 0.0.0.0:5901                0.0.0.0:*                   LISTEN     tcp        0      0 0.0.0.0:5902                0.0.0.0:*                   LISTEN     tcp        0      0 0.0.0.0:5903                0.0.0.0:*                   LISTEN        8. On windows 7 I installed RealVNC Viewer and tried connecting to the server, I get an error promt `connect: Connection refused (10061)`


What program can I use to search the titlebars of all open windows?

I am looking for an application that allows me to search the text of the title bars of all open windows and then foreground the window that most closely matches the text I typed. An application that does this perfectly is Switcher but it is only for windows. Example: Say I have 20 windows open, Terminal, chromium open to google, another chromium window open to evernote, gnucash, etc. and I activate _the program I am looking for_ via keyboard shortcut, then type note and hit enter it should foreground the chromium window that had evernote in the title bar. Does a program exist for linux that does this? I am using Arch Linux with enlightenment as my desktop environment but would be happy to find a tool like this that works in any environment.


How can I install only the basics in Debian?

I'm new on Debian, I moved from Ubuntu and I need to install a light distro on my laptop. I want to use in text mode. I just want to use `gcc`, `nano`, `ghci`, `javac` and some text browser. But when I installed using the CD, the first installation disk ended up installing many packages that I will not use, and I wanted to leave my computer as light as possible. How can I choose just the essential packages that I need to do the basics?


Understanding the structure of an Arch package repository mirror

I'm trying to figure out the structure better of a Arch Linux package repository mirror. There's several folders which are pretty easy to understand, such as community, core, extra, multilib, iso, kde-unstable, gnome-unstable, etc. But there are some others also that are slightly more confusing, such as pool, project, etc. For example, this is the structure of the mirror http://mirror.gnomus.de/               ../     community/     community-staging/     community-testing/     core/     extra/     gnome-unstable/     iso/     kde-unstable/     multilib/     multilib-staging/     multilib-testing/     pool/     project/     staging/     testing/     lastsync      lastupdate      Is there a linux mirror tradition I'm missing here, or is this structure unique to Arch? Also, what do the less obvious folders mean? From what I can gather, it seems as though the pool folder contains all of the packages, while the rest categorize them, but I'm not sure if this is right.


Is there a way to manipulate lines in logcheck rules before sending?

There are a few cases, such as netfilter logs, where it would be great if I could send the report `logcheck` is about to send through a filter. `logcheck(8)` doesn't seem to describe anything like this, nor does the `man` page for `logcheck.conf`.


Echo/Printing text in the color of a given hex code (regardless of Xresources/Xdefaults)

is there any way to echo/print text in the color of a given hex code (#000000, #FFFFFF, etc.) regardless of one's own `Xresources`/`Xdefaults` color definitions? Like, if Bob had in his `Xresources`/`Xdefaults`:               *color1 : #800000       And Tom had in his `Xresources`/`Xdefaults`:               *color1 : #CC3300      And some oddball had in his `Xresources`/`Xdefaults`:               *color1 : #8080FF      Is there anything they could all three type that would show all three of them something like this? ![screenshot](http://i.imgur.com/rPCaevN.png)


How to start tmux with attach if a session exists

If I use               tmux attach      I can attach to a running session but if there is no session running, I only get the error               no sessions      How can I automatically start a new session if there is none running? something like               tmux attach-or-create-new-session


SSH Agent-Forwarding works, but what about sudo -u username no shell/ permissions? composer

Working on a remote server (A) I want to use my local SSH-Keys to access a repository on another server (B) that is not controlled by me. Generally this works like a charm. I log in as myUsername on the remote server (A) and can access the repositories on B just fine. The problem is, that there are some tasks (composer update) that need to be executed by another user on (A). This user is not an admin and the folders where the scripts are executed are his and should only be writable by him and not an entire group, so I can't just chmod all the folders to 777, 775 or something ;) The problem is, that when I want to execute the script with: `sudo -u another_user composer update` sure enough there are no keys found, because they don't get forwarded for this user. Also the "another_user"'s shell is set to bin/false to complicate things even further!!! Is there a solution to this? To sum it all up: I want to access another remote server through my own remote server with my local ssh-keys through `sudo -u another_user ...` Would be great if someone with more experience could enlighten me! **edit** : I also tried this already: http://mybrainhurts.com/blog/2012/05/git-sudo-local-ssh-keys.html But I guess it won't work because the other user has no shell :(


Modifying /bin/login or workaround

I'd like to modify (or rather create a modified copy of) /bin/login. I want the script to start in all ttys (like ordinary /bin/login) but with different functionality - it should allow user to login _only_ using specified keyword (or password if you wish) - this script will then react with granting user privilegies depending on the keyword and execute other appropriate actions. For example: I have user _newbie_. Tty will prompt for secret keyword, either _standard_ or _conservative_. After entering _standard_ , script will grant _newbie_ 's privilegies and fires X server with .xinitrc-standard, containing usual stuff. On the other hand, after entering _conservative_ and granting privilegies, script should switch from nvidia gpu to integrated intel, change other performance-relative stuff and then fire X with .xinitrc config. I am aware this is a security risk, that this can be handled with alias after loging in and other stuff. I just wonder if this is possible.


DNS zone fallback file

I have the following DNS zone(bind):               zone "." IN {         type master;         file "named.root";     };      If this zone directive cannot resolve the address, how can I "fallback" to another file for the same directive. Ie something like this:               zone "." IN {         type master;         file "named.root";         // fallback file if named.root doesnt resolve         file "fallback.root";     };


Blank lines when executing "grep | xargs" in a "find -exec"

I'm trying to list all directories of a web server that are blocked by Apache via a `.htaccess` (containing `deny from all`). I've managed to get the list of blocking `.htaccess` but when I try to extract the directory path using `dirname` I have some errors:   1. List of `.htaccess` files:              find . -type f -name ".htaccess"     ./.htaccess     ./config/.htaccess     ./files/.htaccess     ./plugins/webservices/.htaccess     ./plugins/webservices/scripts/.htaccess     ./install/mysql/.htaccess     ./scripts/.htaccess     ./locales/.htaccess        2. List of blocking `.htaccess` files:              find . -type f -name ".htaccess" -exec sh -c "grep -Eli '^deny from all$' '{}'" \;     ./config/.htaccess     ./files/.htaccess     ./plugins/webservices/scripts/.htaccess     ./install/mysql/.htaccess     ./scripts/.htaccess     ./locales/.htaccess        3. Error come the errors. Same list as in 2. but using `xargs` and `dirname` to get the containing directory:              find . -type f -name ".htaccess" -exec sh -c "grep -Eli '^deny from all$' '{}' | xargs dirname" \;     dirname: missing operand     Try dirname --help' for more information     ./config     ./files     dirname: missing operand     Try dirname --help' for more information     ./plugins/webservices/scripts     ./install/mysql     ./scripts     ./locales        4. Debug attempt of list 3: we can see 2 blank lines where the 2 errors were:              find . -type f -name ".htaccess" -exec sh -c "grep -Eli '^deny from all$' '{}' | xargs echo" \;          ./config/.htaccess     ./files/.htaccess          ./plugins/webservices/scripts/.htaccess     ./install/mysql/.htaccess     ./scripts/.htaccess     ./locales/.htaccess      Theses 2 blank lines obviously matches the 2 `.htaccess` files that were ignore because they don't contains `deny from all`. I don't understand why I get these in lists 3. and 4. but not in 2.


Use Rsync with HTTP

Is it possible to use `rsync` with an HTML POST request? If so what would the `rsync` command look like? For example let's say using HTML5 I have this (bear with me going back to linux stuff):               <form method="post" enctype="multipart/form-data">         <input type="file" name="files[]" id="files" multiple="" directory="" webkitdirectory="" mozdirectory="">         <input class="button" type="submit" value="Upload" />      This produces a webpage having two buttons with which you can upload a directory of files from the local computer. Could I use `rsync` at this point to only download and update files in the directory which are needed, (i.e., firmware update). I don't want to have to download the whole file system because that's slow.


Open program in another terminal window windows-solaris

I am running Attachmate Reflection for UNIX and logging into my Solaris system. I then want to open a file with nedit but I get an error: > NEdit: Can't open display So, I type in               xhost +      and I get the following error:               xhost:  unable to open display ""      So I go a head and do:               setenv DISPLAY [Full Windows Computer Name]:0      and then I check my DISPLAY by:               xauth $DISPLAY       and I get back:               xauth: (argv):1:  unknown command "[Full Windows Computer Name]:0"      and at that point when I try to open the that file with nedit again I get:               Xlib: connection to "[Full Windows Computer Name]:0.0" refused by server     Xlib: No protocol specified     NEdit: Can't open display      Where **[Full Windows Computer Name]** is my windows PC computer name. Anyone has any suggestions what I am doing wrong?


How to log into database via script securely?

I am wondering about whether it is acceptable (security-wise) to have database login credentials (user/pass) set in an environment variable or passed in as a command-line parameter? Both of these methods seem risky to me as perhaps others can read the environment variable or read the running processes/history and credentials would be there in plain-text (Is my understanding correct here?) What would be an acceptable way to do this login? It would be run in a script as part of an automated job/process. Edit: This is an Oracle database (11g) Edit #2: Oracle Wallet was considered at one point, but can't be used yet where I work.


What part of the Linux kernel determines the execution order of userland apps?

Stripping the source, I can't pinpoint which part of the kernel sets and manages the userland apps, and how it does it. For example, in the Linux main source, is the procedure have options to set boot order, and app load order prior to manual determination?


Text-based file navigator with search as you type

How do I set up Midnight Commander or other text-based file navigator so that when I start typing it searches the first directory or file matching the typed text?


Deploying filesystem images onto a partition of arbitrary size

I would like to establish a deployment process for Ubuntu machines based on root FS images. I would like to restore the image onto a simply-formatted hard drive (I can completely erase the disk during deployment). I'd rather keep the config simple and not partition into separate `/` and `/home` So far I've tried using Clonezilla and succeeded in creating an image of the root partition that I can restore. However, using that process leas to the fact that the root partition I restore onto is small, as small as my base image when uncompressed - around 20 gigs. I would like to grow the partition on the actual hard drive to maximum capacity instead, and then restore a filesystem onto it including all symlinks and other bells and whistles. Also I am looking for a process that would reliably install and configure the bootloader and the boot partition on the drive when the partition is restored onto it. Where should I look? It seems that any `dd`-based processes are per block, and you are sort of forced to have your destination partition be of the same size as the image. At the same time I cannot guarantee that all the disks of the machines I am going to be deploying this way are of the same capacity... What would be the approach to take? Maybe I need a higher level imaging solution - one that backs up a filesystem instead of a partition? **UPDATE:** After doing some prodding into the possible configurations my question comes down to this. How do I establish a pipeline where I could do the following in one step:   * boot a machine off a DVD/CD   * format it's hard drive as MBR/root/swap, without any empty space   * make sure that it's bootable   * clone the root partition off a network image So far we've settled on the following workflow:   * make an image of a small disk (70 gigs)   * restore it as a whole   * manually go into gparted and resize the partitions so that the root partition is bigger than it's imaged version but it has us booting two disks in a row, which is very annoying.


Shrink /home partition to two partitions

I have one hard disk on my server               [root@CentOS dev]# df -h     Filesystem      Size  Used Avail Use% Mounted on     /dev/sda3       4.9G  722M  3.9G  16% /     tmpfs           246M     0  246M   0% /dev/shm     /dev/sda1       194M   28M  157M  15% /boot     /dev/sda2       9.9G  164M  9.2G   2% /home      I want to shrink the home partition to two partitions I found `resize2fs` command               umount /home/     e2fsck -f /dev/sda2     resize2fs /dev/sda2 3G     mount /home/      after executing               /dev/sda3       4.9G  722M  3.9G  16% /     tmpfs           246M     0  246M   0% /dev/shm     /dev/sda1       194M   28M  157M  15% /boot     /dev/sda2       5.0G  160M  4.6G   4% /home      the size of /home reduced 3G but I can't found the name of new partition Any one who can give me an idea to solve this, i'll be grateful.


Using trap with ERR: How do I send $?

In bash 4.x If I have:               err_handler() {         echo You received error $1|mail -s "script error" MAILTO     }          trap err_handler ERR      how do I send the actual stderr output to the function when the trap is called? I want to avoid having to put logic on every line to redirect stderr, thats the point of a trap I think.


Sending the output from 'dd' to awk/sed/grep

I'm trying to approximate the computer's write speed using dd:               dd if=/dev/urandom of=/dev/null bs=1K count=10000      which gives the following output               10000+0 records in     10000+0 records out     10240000 bytes (10 MB) copied, 0.746313 s, 13.7 MB/s      How can I get the '13.7 MB/s' into a bash variable? I've tried piping the output from dd to progs like awk, sed and grep to no avail. Ultimately, I'm calling this via `os.system(...)` from within a python script. If anyone knows of a more direct way to get a similar result inside python I'd be interested in that also. I'm trying to predict how long a file copy will take, based on the file size. Any help would be greatly appreciated.


rsync parallel vs serial transmissions

Using Bash 4 and rsync on RHEL 6, are there any differences between the following methods? If so, which is more efficient, and what are the differences between these 3 methods:               1) rsync -avz /files/* user@remote_server:/remote_files     2) for file in /files/*; do rsync -avz $file user@remote_server:/remote_files;done     3) for file in /files/*; do screen rsync -avz $file user@remote_server:/remote_files;done      I am looking for information pertaining to what will transmit the fastest, given the same server. What if there is a low number of large files, vs a large number of small files? Does that matter?


Null input in a text file

I have a script that creates users in Linux as well as Oracle, when I create multiple users I use the following:                     cat /path/path/file.txt | while read USER PASS ORAUSER ROLE             do      However I had the misfortune of leaving the role blank and it did some horrible things to my users access. I was wondering how I can check if the text has an empty variable.


How do I get emacs on a newly installed Fedora 20 system?

I have upgraded from Linux Fedora 12 to Fedora 20 by buying a new computer, and the shop has kindly installed Linux for me from the DVD I bought for the purpose. I assume he did the most basic installation he could. It is all strange coming from 12, and I am a bit lost. The first thing I tried to do was use emacs, but it is not recognised as a command. I had already looked for emacs like this               [root@localhost ~]# cd /usr/share/emacs/     [root@localhost emacs]# ls     site-lisp     [root@localhost emacs]#       So it looked to me as if emacs was there and just not found.               [root@localhost emacs]# emacs     bash: emacs: command not found...      [root@localhost emacs]# yum install emacs     Loaded plugins: langpacks, refresh-packagekit     http://linuxdownload.adobe.com/linux/i386/repodata/repomd.xml: [Errno 14]   curl#6 - "Could not resolve host: linuxdownload.adobe.com"     Trying other mirror.     Error: Cannot retrieve metalink for repository: fedora/20/i386. Please verify its path and try again     [root@localhost emacs]#       So, please what is wrong, and how do I get out of it? In answering this, please treat me as a complete novice, so I can fully understand the answer. I don't immediately recognise most of the cryptic names for things, nor is it easy to discover, out of context, what they mean. ============================================================== That was my original question, so, in response to several answers I tried all this:               [root@localhost emacs]# yum search emacs     Loaded plugins: langpacks, refresh-packagekit     http://linuxdownload.adobe.com/linux/i386/repodata/repomd.xml: [Errno 14] curl#6 - "Could not resolve host: linuxdownload.adobe.com"     Trying other mirror.     Error: Cannot retrieve metalink for repository: fedora/20/i386. Please verify its path and try again     [root@localhost emacs]# yum check-update     Loaded plugins: langpacks, refresh-packagekit     adobe-linux-i386                                         |  951 B     00:00          fedora/20/i386/metalink                                  |  34 kB     00:00          http://ftp.ps.pl/pub/Linux/fedora-linux/releases/20/Everything/i386/os/repodata/repomd.xml: [Errno 14] curl#6 - "Could not resolve host: ftp.ps.pl"     Trying other mirror.        .....      and so on, miles of it, until I stopped it, thus:               ... http://sunsite.mff.cuni.cz/MIRRORS/fedora.redhat.com/linux/releases/20/Everything/i386/os/repodata/repomd.xml: [Errno 14] curl#6 - "Could not resolve host: sunsite.mff.cuni.cz"     Trying other mirror.     ^Z     [1]+  Stopped    yum check-update                   ... and then tried this as well:               [root@localhost emacs]# yum refresh     Loaded plugins: langpacks, refresh-packagekit     No such command: refresh. Please use /usr/bin/yum --help     [root@localhost emacs]# yum install emacs     Loaded plugins: langpacks, refresh-packagekit     Existing lock /var/run/yum.pid: another copy is running as pid 4647.     Another app is currently holding the yum lock; waiting for it to exit...     The other application is: yum     Memory :  24 M RSS ( 51 MB VSZ)     Started: Wed Feb 26 15:31:47 2014 - 06:04 ago     State  : Traced/Stopped, pid: 4647     Another app is currently holding the yum lock; waiti .....      And there I gave up I would be grateful for more suggestions on haw to get out of this impasse. Please, _please,_ only answer if you do really recognise the problem and do know how to fix it. I have spent a lot of time trying other similar ideas from very kindly intended people who thought they _might_ have a solution. Perhaps the only way to resolve it might be to re-install Fedora, I haven't got any data to lose yet, but that does seem a dangerous and long winded way to go about it


Wifi on/off button on TP-Link WR841ND

I installed OpenWRT into TP-Link WR841ND. Everything works as expected, but I can't get the wifi on/off switch working. I followed the guide described on the OpenWRT page for this router. Scripts in `/etc/hotplug.d/button/` simply don't get executed at all when I turn the switch on or off. What could be the cause? Is there some package or kernel module missing? My installed packages:               base-files - 117-r36088     busybox - 1.19.4-6     dnsmasq - 2.62-2     dropbear - 2011.54-2     firewall - 2-55.1     hotplug2 - 1.0-beta-4     iptables - 1.4.10-4     iw - 3.6-1     jshn - 2013-01-29-0bc317aa4d9af44806c28ca286d79a8b5a92b2b8     kernel - 3.3.8-1-d6597ebf6203328d3519ea3c3371a493     kmod-ath - 3.3.8+2012-09-07-3     kmod-ath9k - 3.3.8+2012-09-07-3     kmod-ath9k-common - 3.3.8+2012-09-07-3     kmod-cfg80211 - 3.3.8+2012-09-07-3     kmod-crypto-aes - 3.3.8-1     kmod-crypto-arc4 - 3.3.8-1     kmod-crypto-core - 3.3.8-1     kmod-gpio-button-hotplug - 3.3.8-1     kmod-ipt-conntrack - 3.3.8-1     kmod-ipt-core - 3.3.8-1     kmod-ipt-nat - 3.3.8-1     kmod-ipt-nathelper - 3.3.8-1     kmod-leds-gpio - 3.3.8-1     kmod-ledtrig-default-on - 3.3.8-1     kmod-ledtrig-netdev - 3.3.8-1     kmod-ledtrig-timer - 3.3.8-1     kmod-ledtrig-usbdev - 3.3.8-1     kmod-lib-crc-ccitt - 3.3.8-1     kmod-mac80211 - 3.3.8+2012-09-07-3     kmod-nls-base - 3.3.8-1     kmod-ppp - 3.3.8-1     kmod-pppoe - 3.3.8-1     kmod-pppox - 3.3.8-1     kmod-usb-core - 3.3.8-1     kmod-usb-ohci - 3.3.8-1     kmod-usb2 - 3.3.8-1     kmod-wdt-ath79 - 3.3.8-1     libblobmsg-json - 2013-01-29-0bc317aa4d9af44806c28ca286d79a8b5a92b2b8     libc - 0.9.33.2-1     libgcc - 4.6-linaro-1     libip4tc - 1.4.10-4     libiwinfo - 36     libiwinfo-lua - 36     libjson - 0.9-2     liblua - 5.1.4-8     libnl-tiny - 0.1-3     libubox - 2013-01-29-0bc317aa4d9af44806c28ca286d79a8b5a92b2b8     libubus - 2013-01-13-bf566871bd6a633e4504c60c6fc55b2a97305a50     libubus-lua - 2013-01-13-bf566871bd6a633e4504c60c6fc55b2a97305a50     libuci - 2013-01-04.1-1     libuci-lua - 2013-01-04.1-1     libxtables - 1.4.10-4     lua - 5.1.4-8     luci - 0.11.1-1     luci-app-firewall - 0.11.1-1     luci-i18n-english - 0.11.1-1     luci-lib-core - 0.11.1-1     luci-lib-ipkg - 0.11.1-1     luci-lib-nixio - 0.11.1-1     luci-lib-sys - 0.11.1-1     luci-lib-web - 0.11.1-1     luci-mod-admin-core - 0.11.1-1     luci-mod-admin-full - 0.11.1-1     luci-proto-core - 0.11.1-1     luci-proto-ppp - 0.11.1-1     luci-sgi-cgi - 0.11.1-1     luci-theme-base - 0.11.1-1     luci-theme-openwrt - 0.11.1-1     mtd - 18.1     netifd - 2013-01-29.2-4bb99d4eb462776336928392010b372236ac3c93     opkg - 618-3     ppp - 2.4.5-8     ppp-mod-pppoe - 2.4.5-8     swconfig - 10     uboot-envtools - 2012.04.01-1     ubus - 2013-01-13-bf566871bd6a633e4504c60c6fc55b2a97305a50     ubusd - 2013-01-13-bf566871bd6a633e4504c60c6fc55b2a97305a50     uci - 2013-01-04.1-1     uhttpd - 2012-10-30-e57bf6d8bfa465a50eea2c30269acdfe751a46fd     wifitoggle - 1-3     wpad-mini - 20120910-1      Kernel modules:               Module                  Size  Used by    Tainted: G       ath79_wdt               2240  1      ohci_hcd               16160  0      ledtrig_usbdev          2032  0      ledtrig_netdev          3184  0      nf_nat_irc               784  0      nf_conntrack_irc        2464  1 nf_nat_irc     nf_nat_ftp               976  0      nf_conntrack_ftp        4416  1 nf_nat_ftp     ipt_MASQUERADE           976  1      iptable_nat             2544  1      nf_nat                 10256  4 nf_nat_irc,nf_nat_ftp,ipt_MASQUERADE,iptable_nat     pppoe                   7488  0      xt_conntrack            2048  3      xt_CT                   1216  0      xt_NOTRACK               448  0      iptable_raw              560  1      xt_state                 608  0      nf_conntrack_ipv4       4384  6 iptable_nat,nf_nat     nf_defrag_ipv4           656  1 nf_conntrack_ipv4     nf_conntrack           38336 12 nf_nat_irc,nf_conntrack_irc,nf_nat_ftp,nf_conntrack_ftp,ipt_MASQUERADE,iptable_nat,nf_nat,xt_conntrack,xt_CT,xt_NOTRACK,xt_state,nf_conntrack_ipv4     ehci_hcd               33632  0      pppox                   1152  1 pppoe     ipt_REJECT              1808  2      xt_TCPMSS               2560  1      ipt_LOG                 6160  0      xt_comment               400  0      xt_multiport            1104  0      xt_mac                   528  0      xt_limit                 944  1      iptable_mangle           832  1      iptable_filter           592  1      ip_tables               8864  4 iptable_nat,iptable_raw,iptable_mangle,iptable_filter     xt_tcpudp               1632  4      x_tables                9984 18 ipt_MASQUERADE,iptable_nat,xt_conntrack,xt_CT,xt_NOTRACK,iptable_raw,xt_state,ipt_REJECT,xt_TCPMSS,ipt_LOG,xt_comment,xt_multiport,xt_mac,xt_limit,iptable_mangle,iptable_filter,ip_tables,xt_tcpudp     ppp_async               5952  0      ppp_generic            18848  3 pppoe,pppox,ppp_async     slhc                    4368  1 ppp_generic     ath9k                  84944  0      ath9k_common            1152  1 ath9k     ath9k_hw              329024  2 ath9k,ath9k_common     ath                    14320  3 ath9k,ath9k_common,ath9k_hw     mac80211              252240  1 ath9k     usbcore                99200  4 ohci_hcd,ledtrig_usbdev,ehci_hcd     usb_common               480  1 usbcore     nls_base                4640  1 usbcore     crc_ccitt                944  1 ppp_async     cfg80211              153696  3 ath9k,ath,mac80211     compat                  5776  5 ath9k,ath9k_common,ath9k_hw,mac80211,cfg80211     arc4                     768  2      aes_generic            29808  0      crypto_algapi           9200  2 arc4,aes_generic     ledtrig_timer           1072  0      ledtrig_default_on       416  0      leds_gpio               1552  0      gpio_button_hotplug     3184  0


Mirror dual monitors with different resolutions

I use the following `xrandr` command to mirror my 17" laptop with a 27" external monitor, so I can use it to do presentations: `xrandr --output LVDS1 --mode 1600x900 --output HDMI1 --mode 1920x1080 --same- as LVDS1` However, the external monitor (HDMI1) falls back to a 1600x900 resolution instead of 1920x1080. xrandr output:               Screen 0: minimum 320 x 200, current 1920 x 1080, maximum 8192 x 8192     LVDS1 connected primary (normal left inverted right x axis y axis        1600x900       60.0 +        1024x768       60.0          800x600        60.3     56.2          640x480        59.9       VGA1 disconnected (normal left inverted right x axis y axis)     HDMI1 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 598mm x 336mm        1920x1080      60.0*+        1680x1050      59.9          1280x1024      75.0     60.0          1440x900       75.0     59.9          1280x960       60.0          1152x864       75.0          1024x768       75.1     70.1     60.0          832x624        74.6          800x600        72.2     75.0     60.3     56.2          640x480        72.8     75.0     66.7     60.0          720x400        70.1       DP1 disconnected (normal left inverted right x axis y axis)


command not found handle doesn't work for url

I'm trying to setup the command_not_found_handle for URL links,               %> command_not_found_handle() { echo "OK"; }     %> aaaaa     OK     %> http://www.google.com     bash: http://www.google.com: No such file or directory      So it works for normal input, but not URL links, any ideas?


Configuring Vim with clientserver and clipboard

On OS X I have vim working just fine from homebrew. The default homebrew install compiles vim with these flags.               ./configure       --prefix=/usr/local       --mandir=/usr/local/Cellar/vim/7.4.161/share/man       --enable-multibyte       --with-tlib=ncurses       --enable-cscope       --with-features=huge       --with-compiledby=Homebrew            --enable-rubyinterp       --enable-pythoninterp       --enable-gui=no       --without-x      This install works perfectly with the system clipboard using this in my vimrc:               if has("clipboard")         set clipboard=unnamed     endif      Homebrew also has flags for installing `--with-client-server` if you use this it compiles vim with:               ./configure       --prefix=/usr/local       --mandir=/usr/local/Cellar/vim/7.4.161/share/man       --enable-multibyte       --with-tlib=ncurses       --enable-cscope       --with-features=huge       --with-compiledby=Homebrew            --enable-rubyinterp       --enable-pythoninterp       --enable-gui=gtk2      This compiles vim with `+clientserver` and `+clipboard`. Running `set clipboard?` returns `unnamed` yet now the integration with the system clipboard does not work at all, even when prefixing commands with `"+` or `"*`. Is there a way I can have both of these features work with a single vim install? **EDIT:** After some more searching I believe this is an issue on OS X with the system pasteboard not being correctly synced with the X11 server. I found a similar question here which gives you the settings you need to setup clipboard sync with X11. There is also a gui for that in the newer versions. ![X11 Prefs](http://i.stack.imgur.com/0Z4eT.png) Unfortunately this didn't work. I believe it's covered here in an open bug report on the xquartz tracker. It also looks like this may have been an issue for a while.


Changing the PS1 on an interactive bash subshell easily

I have a situation where I need to provide a subshell to a user mid-way through a longish process. I would like to change the prompt to remind the user that they are in a special subshell and haven't gone through the rest of the process yet. I thought that this would do what I want...               echo "PS1='foo:'" | bash -i      But when I enter that line, this is the output I get               me@mercury:~$ PS1='foo:'     foo:exit     me@mercury:~$       Is there a simple way around this? I could writeup my own custom bashrc... but I'd prefer to preserve the user's usual bash-shell setup.


Open programs without locking terminal through Putty

There's a bunch of proprietary software installed on our university linux computers, which is accessible through remote control via Putty. When I'm using my own Linux box, if I want to retain control over the terminal after launching a program, I just use 'matlab $' etc. But for some reason, this doesn't work in Putty, which is pretty annoying since we need access to Matlab, emacs and AMPL all at the same time. 'matlab $' in the Putty terminal simply opens Matlab and leaves my one terminal unavailable. Any ideas on what's going on here?


If there's no /dev/md* and not /proc/mdstat, is it safe to use a second disk as a second disk?

There's two HDs in this server. I don't see an md device (see title) or an mdstat file. So, can I be safe that the second disk is currently unused? Yes, I do want/need the second disk as space much more than RAID-"safety", in case you're wondering. OS is Debian sid (aka unstable).


How can I tell what version of apache I'm running?

I know about the phpinfo() way but is there any other way? I'm using CentOS and I can't find the httpd executable to run httpd -v.


Why do I get different outputs when running my shellscript manually from when I run it with cron?

I have a fairly simple shell script (`foo.sh`) that looks like this:               #!/bin/bash     echo -n "$USER,$(date)," `binary -flags | sed -e '1,30d'`;     exit 0;      This script is supposed to prepare some output which will then be appended to a text file, like so:               foo.sh >> data.csv      When I run the above on a root prompt, it works fine. However, when I type the exact same command into my (root) crontab which looks like this:               05 * * * * /root/foo.sh >> /path/to/data.csv      The crontab output differs! I wasn't expecting this and I can't understand why. See examples below:               Expected, normal output from running my .sh (example):     Fri Jun 14 16:32:34 CEST 2013,20130614163304,268828672,71682561          The output written to the file by cron:     Fri Jun 14 16:32:34 CEST 2013,      The rights on the binary run in the .sh looks like this:               -rwxr-xr-x  1 root root      Why does the output differ? How can I get the correct output into my CSV file?


Does cron impose some limitations to types of commands and privilege of execution?

I've experienced an issue where some of my scripts run perfectly fine when I call them manually, but these same scripts when called as cron jobs via `cron` don't seem to work at all. **So my question:** I'd like to know if there are restrictions that apply with the use of commands and/or scripts (and the privilege of execution) in a script scheduled to run with `cron`?


connecting to a wifi using wpa_supplicant

I have some problems connecting to my WiFi (WPA2, standard settings) using wpa_supplicant. My `/etc/wpa_supplicant.conf` is as follows:               network={         ssid="MYWIFI"         psk=********     }      then my /etc/network/interfaces               auto lo     iface lo inet loopback      After putting `wpa_supplicant -D -i wlan0 -c /etc/wpa_supplicant.conf` into the console I get a connection, it says: > Successfully initialized wpa_supplicant. But there is no connection. How can I ge this to work?


Is there an equivalent book/resource to "The Linux Programming Interface" for FreeBSD?

Most of you here are probably aware of the famous _The Linux Programming Interface_ , which presents a truly masterful guide to the Linux and general POSIX APIs. I know that much of the general POSIX knowledge can be applied to all Unix/Unix-like systems. However, I'm interested as to whether there is an equivalent book, document or resource concerning lower level FreeBSD systems programming and interfaces that are exclusive to it, such as GEOM and devd. Or should I simply stick to manpages and docs?


Install NCDU on Scientific from EPEL

**Introduction** The commands specified in the answers to this question and this documentation have been applied to install NCDU on Scientific using EPEL without success. According to this documentation it should be possible to install ncdu using EPEL. _setup EPEL repo_               $ sudo wget http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm     $ sudo rpm -ivh epel-release-6-8.noarch.rpm     warning: epel-release-6-8.noarch.rpm: Header V3 RSA/SHA256 Signature, key ID 060     8b895: NOKEY     Preparing...                ########################################### [100%]             package epel-release-6-8.noarch is already installed      _install ncdu_               $ sudo yum install ncdu -y     Loaded plugins: security     Error: Cannot retrieve repository metadata (repomd.xml) for repository: epel. Please verify its path and try again      **Question:** How to install NCDU on Scientific from EPEL?


Linux From Scratch: libgmp.la, libmpfr.la, and libmpc.la not found during version-check

I'm trying to build a Linux From Scratch system on my host Linux Mint machine. However, when I run the version-check.sh file, it returns that my system is missing `libgmp.la`, `libmpfr.la`, and `libmpc.la`, even though I have `libgmp10`, `lipmpc3`, and `libmpfr4` . Here is the output of version check:               bash, version 4.2.45(1)-release     /bin/sh -> /bin/dash     Binutils: (GNU Binutils for Ubuntu) 2.23.52.20130913     bison (GNU Bison) 2.7.12-4996     /usr/bin/yacc -> /usr/bin/bison.yacc     bzip2,  Version 1.0.6, 6-Sept-2010.     Coreutils:  8.20     diff (GNU diffutils) 3.2     find (GNU findutils) 4.4.2     GNU Awk 4.0.1     /usr/bin/awk -> /usr/bin/gawk     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1     g++ (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1     (Ubuntu EGLIBC 2.17-93ubuntu4) 2.17     grep (GNU grep) 2.14     gzip 1.6     Linux version 3.11.0-12-generic (buildd@komainu) (gcc version 4.8.1           (Ubuntu/Linaro 4.8.1-10ubuntu7) ) #19-Ubuntu SMP Wed Oct 9 16:12:00 UTC 2013     m4 (GNU M4) 1.4.16     GNU Make 3.81     GNU patch 2.7.1     Perl version='5.14.2';     sed (GNU sed) 4.2.2     tar (GNU tar) 1.26     xz (XZ Utils) 5.1.0alpha     g++ compilation OK     libgmp.la: not found     libmpfr.la: not found     libmpc.la: not found      **NOTE:** I'm following version 7.5 of the book and I'm using a 32-bit Linux Mint host (kernel 3.11.0-12).


How do I enable a new repository in CentOS?

I need to upgrade my version of subversion however, simply running `yum update subversion` tells me: > Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * > addons: mirror.nic.uoregon.edu * base: mirror.ubiquityservers.com * extras: > centos.promopeddler.com * updates: mirror.chpc.utah.edu Setting up Update > Process No Packages marked for Update So, I need to know how I can find a repository for subversion-1.6 and the steps involved to impliment this repository on my machine. I see this rpm here: http://ftp.redhat.com/pub/redhat/linux/enterprise/5Client/en/os/SRPMS/subversion-1.6.11-7.el5.src.rpm but I don't know that this really helps. Thank you very much!


md5deep utility giving wrong/different output!

md5deep utility gives different result when calculating hashes. I have used several online tools to calculate hash and they give same result but md5sum or md5deep program on linux gives different output. Any ideas what I am doing wrong?               Website        = http://hash.online-convert.com/whirlpool-generator      string         = foobar     whirlpool hash = 9923afaec3a86f865bb231a588f453f84e8151a2deb4109aebc6de4284be5bebcff4fab82a7e51d920237340a043736e9d13bab196006dcca0fe65314d68eab9          Website        = http://www.sha1-online.com/     string         = foobar     whirlpool hash = 9923afaec3a86f865bb231a588f453f84e8151a2deb4109aebc6de4284be5bebcff4fab82a7e51d920237340a043736e9d13bab196006dcca0fe65314d68eab9          md5deep tool on Linux Mint x64 KDE i5 processor     string = foobar     whirlpool = 37b100ba4d775e394c6db6062e2ca0cc8431948f7aea03c0a07991bcd139599735bdcac9dc0b4ae3c91912f93dd0f736a8c0c7a44996c2bd2e16939ac37c44a7


How can I automate this manual task of finding a particular ancestor process from a given pid or command?

I know the full command "/bin/child_process" or its pid (3996 in this case) and I'm running `ps auxf` and then visually identifying its ancestor process `/bin/parent_process foobar`.               root      3227  0.0  0.0    992   296 ?        S<s  10:35   0:00 /bin/parent_process foobar     20058     3987  0.0  0.0  17716  1452 ?        S<s  10:35   0:00  \_ /bin/bash     20058     3989  0.0  0.0  19240  1728 ?        S<   10:35   0:00      \_ /bin/bash other_args     20058     3996  0.2  1.5 1621804 546104 ?      S<l  10:35   0:54          \_ /bin/child_process      The ancestor process may not always be 3 levels away. Is there a way I can automate this with a command such that I could supply just the pid `3996` or the command `/bin/child_process` and get out `/bin/parent_process foobar`? In particular, it will always say `/bin/parent_process`, but it will have a different argument than `foobar` every time. The output of `ps auxf` is very difficult to traverse as a hierarchy to determine a particular ancestor process.


What happened to Primary Administrator profile in Solaris 11?

What happened to the "Primary Administrator" profile in Solaris 11? Why was it cut? Are there any alternatives? How does it differ from the root-role (which is `profiles=All;auths=solaris.*`) Is the less powerful "System Administrator" better? Why? Reason to use/not use either/both? On my system, I "re-created" it by adding entries in `/etc/security/prof_attr.d` and `/etc/security/exec_attr.d...` However Solaris 11 lacks the solaris.grant (`auths=solaris.all,solaris.grant;exec=uid=0,gid=0`)... Is grant no longer needed? Are there alternatives?


error while install a package

I have a problem when I want to install `python-pycurl` package:               root@edx:/var/tmp/configuration-master/playbooks# apt-get install python-pycurl     Reading package lists... Done     Building dependency tree            Reading state information... Done     Suggested packages:       libcurl4-gnutls-dev python-pycurl-dbg     The following NEW packages will be installed:       python-pycurl     0 upgraded, 1 newly installed, 0 to remove and 179 not upgraded.     Need to get 0 B/62.3 kB of archives.     After this operation, 233 kB of additional disk space will be used.     debconf: delaying package configuration, since apt-utils is not installed     dpkg: error processing /var/cache/apt/archives/python-pycurl_7.19.3.1-1_amd64.deb (--unpack):      parse error, in file '/var/lib/dpkg/tmp.ci/control' near line 7 package 'python-pycurl':      `Depends' field, invalid package name `python:any': character `:' not allowed (only letters, digits and characters `-+._')     Errors were encountered while processing:      /var/cache/apt/archives/python-pycurl_7.19.3.1-1_amd64.deb     E: Sub-process /usr/bin/dpkg returned an error code (1)      I don't know where the problem is, here is my `/etc/apt/source.list` file :               deb http://security.debian.org/ squeeze/updates main contrib     deb-src http://security.debian.org/ squeeze/updates main non-free          #mirrors     deb http://mirrors.kernel.org/debian/ unstable main contrib non-free     deb-src http://mirrors.kernel.org/debian/ unstable main contrib non-free            # Base repository     deb http://ftp.debian.org/debian/ squeeze main contrib non-free     deb-src http://ftp.debian.org/debian/ squeeze main contrib non-free          # Stable updates     deb http://ftp.debian.org/debian/ squeeze-updates main contrib non-free     deb-src http://ftp.debian.org/debian/ squeeze-updates main contrib non-free      Does someone have any idea ?


Compiling Awesome from source on CentOS: cannot find libraries

I am trying to install `awesome` (v3.5.5) on `CentOS7`. Since I could not find a repository that carries it, I am compiling it from source. However, I am getting this error on running make:               -- checking for modules 'glib-2.0;gdk-pixbuf-2.0;cairo;x11;xcb-cursor;xcb-randr;xcb-xtest;xcb-xinerama;xcb-shape;xcb-util>=0.3.8;xcb-keysyms>=0.3.4;xcb-icccm>=0.3.8;cairo-xcb;libstartup-notification-1.0>=0.10;xproto>=7.0.15;libxdg-basedir>=1.0.0'     --   package 'xcb-cursor' not found     --   package 'libxdg-basedir>=1.0.0' not found     CMake Error at /usr/share/cmake/Modules/FindPkgConfig.cmake:279 (message):       A required package was not found     Call Stack (most recent call first):       /usr/share/cmake/Modules/FindPkgConfig.cmake:333 (_pkg_check_modules_internal)       awesomeConfig.cmake:134 (pkg_check_modules)       CMakeLists.txt:15 (include)               CMake Error at awesomeConfig.cmake:153 (message):     Call Stack (most recent call first):       CMakeLists.txt:15 (include)               -- Configuring incomplete, errors occurred!     make: *** [cmake] Error 1      However, I have install (again from source) those two libraries:               [awesome-3.5.5]$ ls /usr/local/lib/*cursor*     /usr/local/lib/libxcb-cursor.a   /usr/local/lib/libxcb-cursor.so.0     /usr/local/lib/libxcb-cursor.la  /usr/local/lib/libxcb-cursor.so.0.0.0     /usr/local/lib/libxcb-cursor.so     [awesome-3.5.5]$ ls /usr/lcoal/lib/*libxdg-basedir*     /usr/local/lib/libxdg-basedir.a   /usr/local/lib/libxdg-basedir.so.1     /usr/local/lib/libxdg-basedir.la  /usr/local/lib/libxdg-basedir.so.1.2.0     /usr/local/lib/libxdg-basedir.so      and I configured ldconfig to include /usr/local/lib, updated the cache...               ldconfig -p | grep xcb-cursor         libxcb-cursor.so.0 (libc6,x86-64) => /usr/local/lib/libxcb-cursor.so.0         libxcb-cursor.so (libc6,x86-64) => /usr/local/lib/libxcb-cursor.so          ldconfig -p | grep xdg-basedir         libxdg-basedir.so.1 (libc6,x86-64) => /usr/local/lib/libxdg-basedir.so.1         libxdg-basedir.so (libc6,x86-64) => /usr/local/lib/libxdg-basedir.so      I am afraid that I am stumped... Could it be SELinux?


Get the actions for a command programmatically

Let's take the `git` example:               $ git<TAB><TAB>     git                 git-import-dscs     git-shell     git-buildpackage    git-import-orig     git-upload-archive     git-dch             git-pbuilder        git-upload-pack     git-import-dsc      git-receive-pack          Notice the after `git`:               $ git <tab><tab>     add                 fetch               push      am                  filter-branch       rebase      annotate            format-patch        reflog      apply               fsck                relink      archive             gc                  remote      bisect              get-tar-commit-id   repack      blame               grep                replace      branch              help                request-pull      buildpackage        imap-send           reset      bundle              import-dsc          revert      checkout            import-dscs         rm      cherry              import-orig         shortlog      cherry-pick         init                show      clean               instaweb            show-branch      clone               log                 stage      column              merge               stash      commit              mergetool           status      config              mv                  submodule      credential          name-rev            subtree      --More--      Writing `git re`               $ git re<tab><tab>     rebase         relink         repack         request-pull   revert      reflog         remote         replace        reset                    $ git remote <tab><tab>     add            remove         set-branches   set-url        update      prune          rename         set-head       show                 Generally:               $ command <tab>      [actions]      How can I get these actions programmatically? Is this possible via a shell/bash script?


Blanket blocking SMTP with whitelist

So using a VPS environment, whereby we need to block outbound SMTP by default (spammers), with the ability to unblock when needed. We have found some scripts eg:   iptables -I FORWARD 1 -d $VPS_IP -p tcp -m tcp --dport 25 -j DROP   iptables -I FORWARD 1 -s $VPS_IP -p tcp -m tcp --dport 25 -j DROP and   iptables -I FORWARD -p tcp --sport 25 -j DROP   iptables -I FORWARD -p tcp --dport 25 -j DROP However controlling the blocking via the first set is inefficient, especially when the range of IPs can be changing. So the question is, if we use set 2 (blanket block), how do we allow certain IPs? I'm guessing we need to add something to the OUTPUT chain, however wouldn't the blanket block be processed first? Or if we add to FORWARD, since they are further down the chain, wouldn't the blanket block go first? etc.. The iptables -L looks like:               [root@server ~]# iptables -L     Chain INPUT (policy ACCEPT)     target     prot opt source               destination          Chain FORWARD (policy ACCEPT)     target     prot opt source               destination     SOLUSVM_TRAFFIC_IN  all  --  anywhere             anywhere     SOLUSVM_TRAFFIC_OUT  all  --  anywhere             anywhere            all  --  somedomain  anywhere            all  --  anywhere             somedomain            Chain OUTPUT (policy ACCEPT)     target     prot opt source               destination          Chain SOLUSVM_TRAFFIC_IN (1 references)     target     prot opt source               destination            all  --  anywhere             somedomain            Chain SOLUSVM_TRAFFIC_OUT (1 references)     target     prot opt source               destination            all  --  somedomain    anywhere      Much appreciated! (going to post a job on coders for hire or something if it isn't answered)


Will the Linux ( red-hat ) Open VPNC Client connect to checkpoint or nortel VPN gateways?

Site: http://www.oucs.ox.ac.uk/network/vpn/linux-solaris/index.xml?ID=VPNC What is open VPNC: VPNC is an open-source VPN client for Linux and other Unix systems which is compatible with the OUCS VPN Service and which offers some advantages over the ‘official’ Cisco VPN client for Linux My question: So VPNC will connect to Cisco VPN gateways. But will it connect to Checkpoint's or Nortel's gateways as well? IF NOT: then please advice if there are some other tools like OPEN VPNC that can service checkpoint or Nortel VPNs ?


How to sniff download information of different pc's on a network(router)

Actually I am making an Log Analyzer for downloads on a network by different users.So i want to know who downloaded what in a same network.I know SSL packets cannot be sniffed but I want only downloads that is not secured by SSL.


The libblkid library: any way to use it with blocks in the core memory?

I know how to use the `libblkid` library to analyze existing block devices. I'd like to use it to analyze a memory extent **before** I write it to the block device. Something like that:               char block[4096];     ... writing into the block      blkid_probe pr = blkid_new_probe_from_address(block);     ... calling usual libblkid function on the pr      Of course, the `blkid_new_probe_from_address` doesn't exist - is it any way to create this kind of function using existing `libblkid` functions and without getting much into guts of this library? Or, may be some other toolkit can achieve that?


Copy a local file to a remote server, non-root privileges over sudo?

I'd like to do something like:               scp local_file remote_server:/some_directory      But in order to gain privileges to /some_directory, we need to call `sudo`. I know that a similar question had already been asked quite a few times here, but most of the answers either took advantage of `sudo`'s password caching (which for some reason doesn't seem to work for me in two consecutive `ssh` calls) or the fact that we're root (so we can set up a passwordless `sudo` or make SSH let in root). In the latter, both of the solutions seem insecure, so I'd rather like to assume that we're not calling `sudo` to become root and thus can't reconfigure the system. What can be done in such a situation to simply copy a file? Here are my attempts so far:               (      read -s -p 'Enter password: ' pass;      echo $pass ;      tar cf - local_file ) | ssh -t -t remote_server 'sudo tar -C /some_directory' )      Is there a better way?


What is the effect of "${(@f)…}" in Zsh?

I ran into a Zsh script and wanted to know its meaning. In the scripts below there is `${$(@f)$(egrep "$2","$file")}` expression. From what I searched, `@` is to use represent all positional parameters, but then the postfix letter `f` is not mentioned anywhere in above script and I couldn't find any online material saying its special meaning.               #!/usr/bin/env zsh          tmp_file="/tmp/_unsorted_find_n_grep"     echo "--- find <$2> in <$1>" > $tmp_file          find . -follow -iname "$1" | while read file     do         timestamp=$(ls -l --time-style=+"%Y-%m-%d %H:%M:%S" "$file" | gawk '{print $6, $7}')         linestack=${(@f)$(egrep "$2" "$file")}         for line in $linestack      do         echo "$timestamp $file: $line" >> $tmp_file     done     done          cat $tmp_file | sort     rm $tmp_file


Do I have two VGA compatible controllers?

`lshw` shows two VGA compatible controllers.   1. Where are they located?   2. What are they used for respectively? Which one do you recommend to use?    3. Which of the two controllers am I using currently?   4. With only my T400, is it possible to switch between the two controllers? Thanks! output file is here and the relevant part is here:               *-pci:0          description: PCI bridge          product: Mobile 4 Series Chipset PCI Express Graphics Port          vendor: Intel Corporation          physical id: 1          bus info: pci@0000:00:01.0          version: 07          width: 32 bits          clock: 33MHz          capabilities: pci normal_decode bus_master cap_list          configuration: driver=pcieport          resources: irq:40 ioport:2000(size=4096) memory:bff00000-bfffffff ioport:c0000000(size=268435456)        *-display             description: VGA compatible controller             product: RV620/M82 [Mobility Radeon HD 3450/3470]             vendor: Hynix Semiconductor (Hyundai Electronics)             physical id: 0             bus info: pci@0000:01:00.0             version: 00             width: 32 bits             clock: 33MHz             capabilities: vga_controller bus_master cap_list rom             configuration: driver=radeon latency=0             resources: irq:51 memory:c0000000-cfffffff ioport:2000(size=256) memory:bfff0000-bfffffff memory:bff00000-bff1ffff     *-display          description: VGA compatible controller          product: Mobile 4 Series Chipset Integrated Graphics Controller          vendor: Intel Corporation          physical id: 2          bus info: pci@0000:00:02.0          version: 07          width: 64 bits          clock: 33MHz          capabilities: vga_controller bus_master cap_list rom          configuration: driver=i915 latency=0          resources: irq:49 memory:fc000000-fc3fffff memory:d0000000-dfffffff ioport:1800(size=8)      * * *               $ xrandr     Screen 0: minimum 320 x 200, current 1440 x 900, maximum 8192 x 8192     LVDS1 connected 1440x900+0+0 (normal left inverted right x axis y axis) 303mm x 190mm        1440x900       60.0*+   59.9     50.0          1360x768       59.8     60.0          1152x864       60.0          1024x768       60.0          800x600        60.3     56.2          640x480        59.9       VGA1 disconnected (normal left inverted right x axis y axis)     DP1 disconnected (normal left inverted right x axis y axis)


When exiting the last terminal in a tmux session can it switch to another?

When I exit the last terminal in a tmux session it will automatically close tmux and return me to the parent terminal. Is it possible to instead have tmux switch to another, already running, session instead of closing? I create a new named session for every task that I work on, such as TRxxx, email, scratch etc and when I am done with one of them I close all the terminals by running exit in every one. When you run exit in the last terminal of a session tmux will return you to the parent terminal but is it possible to get it to just switch to one of the other open sessions instead so I don't have to reattach? This question is similar to "Kill a tmux session and select another tmux session" but I want to close my terminals the nice way by using exit rather than killing the window.


check if interface eth0 is up (configured)

I need to check with a script, whether `eth0` is configured. If so, the script will do nothing. Otherwise it will start `wlan0`. (I don't want both `eth0` and `wlan0` to be up at the same time). What would be the easiest way to check, whether `eth0` is already up? I am using Debian Wheezy # CLARIFICATION: I would like to check not only that the cable in `eth0` is plugged in, but rather that the interface is configured (i.e. it has either static IP set, or it has received a DHCP IP). If cable is plugged in, but `eth0` is not configured correctly, I want to start `wlan0`


What is this 1K logical partition?

I noticed that I have a strange partition under `sda3`, with a size of 1K. I am about to reformat my hard drive and re-install my OS with Ubuntu 14.04 while creating separate partitions for `/` and `/home`. What is this almost-empty partition, and should I do anything with it? Why is it in `lsblk` but not in `blkid`?               [lucas@lucas-ThinkPad-W520]~$ sudo blkid     /dev/sda1: LABEL="SYSTEM_DRV" UUID="30CA6C06CA6BC6A6" TYPE="ntfs"      /dev/sda2: LABEL="Windows7_OS" UUID="9426707E26706362" TYPE="ntfs"      /dev/sda4: LABEL="Lenovo_Recovery" UUID="E2CA772DCA76FD5B" TYPE="ntfs"      /dev/sda5: UUID="7d513625-85de-41b7-9c81-0d3fbc4e6a0f" TYPE="ext4"      /dev/sda6: UUID="602d2625-8ab9-44e5-b73a-d1f0181f5549" TYPE="swap"           [lucas@lucas-ThinkPad-W520]~$ lsblk     NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT     sda      8:0    0 465.8G  0 disk     ├─sda1   8:1    0   1.5G  0 part /media/lucas/SYSTEM_DRV     ├─sda2   8:2    0 262.1G  0 part /media/lucas/Windows7_OS     ├─sda3   8:3    0     1K  0 part     ├─sda4   8:4    0  15.6G  0 part /media/lucas/Lenovo_Recovery     ├─sda5   8:5    0 178.7G  0 part /     └─sda6   8:6    0   7.9G  0 part [SWAP]     sr0     11:0    1  1024M  0 rom


How to see screen information at the top of terminal?

I once used a server where using the screen command gave me a colorful header which told me the name of the screen, the total number of screens, the runtime, cpu utilization and maybe some hotkeys to cycle between the instances. How can I achieve this header on my Ubuntu Precise Pangolin server instance (I have admin rights)? As it is, I don't even see if I'm inside a screen or not.


What are the default openSUSE 13.1 user groups?

I just installed openSUSE 13.1, and I can't even start X on boot. I have to switch to another tty and type `startx` (after I set suid for xorg). On top of this, I can barely do anything without root privileges (like shutdown from the GUI) I believe it is because my user is only a memeber of the `users` group, and I know the default is more groups. What are the default groups so I can add my user to them?


Grep and cut the selected field

I am trying to cut the field if a line starts with a particular name,               cat $1|while read line     do     if [ "$1" = "custbills.cmp" ]; then     acc_no=`grep "^Custbills" $1 | cut -c29-43`     acc_type=`grep "^Custbills" $1 |cut -c124-125`     echo "\"${acc_no}\",\"${acc_type}\"" >> out.csv     else      echo ""     fi     done      but is giving error and in output file i am getting only ','. what is wrong in my script


Filesystem unmounted after weekend

I have a problem with an AIX server what I manage. I had some filesystem created to store the structure of an Oracle instance. But after the weekend scheduled reboot the filesystems are unmounted when we arrive on monday morning. The unmounted filesystems appears in the /etc/filesystem file. There are two of the filesystems. Extracted from /etc/filesystem file               /appli2/oracle/DATA/oradata05:             dev             = /dev/lvoradata05HIST             vfs             = jfs2             log             = /dev/loglv01             mount           = false             account         = false          /appli2/oracle/DATA/oraarch:             dev             = /dev/lvoraarchHISTO             vfs             = jfs2             log             = /dev/loglv01             mount           = false             account         = false      Any idea why the filesystem gets unmounted after weekend reboot? We use AIX 6 as operating system.


Print the last-but-one field

How to print the word before the last word in line (with ksh or awk or sed or perl one liner) Example 1:                 echo one two three      will print "two" Example 2:                echo 1 2 3 4 5 6      will print "5"


How to install Intel binary file on Arm?

I am trying to install a binary file and I get the output as "`Cannot install binary`" When I did `file .bin` Output is: `c64plus- imglib_2_02_00_00_Linux-x86_Setup.bin: ELF 32-bit LSB executable, Intel 80386, version 1 (GNU/Linux), statically linked, stripped` Amy Arm Machine: `Uname -a:`               Linux overo 3.5.7 #1 PREEMPT Thu Jan 9 16:37:38 CET 2014 armv7l GNU/Linux      Is there a method to install intel binary on Arm processor?


Configure iptables on remote server without locking me up

I have a little remote server that I can access only with SSH, and what I want to do, is block all the traffic except port 22 for SSH. The first time, what I did was :               iptables -P INPUT DROP      And of course, it locked me up because I didn't let any input traffic, so I couldn't add the following rules to accept SSH traffic. How can I block all the traffic (except SSH) and in the same time letting me have access to the server through SSH?


Postgresql 9.3 with posgis extenstions not working after restart

I'm running Mint 16. In `pgAdmin` it gives me this output. An error has occurred: > ERROR: could not load library "/usr/lib/postgresql/9.3/lib/postgis-2.1.so": > libjson.so.0: cannot open shared object file: No such file or directory Well, `libjson0` is installed. I can't remove this package, because:               sudo apt-get remove libjson0      Gives me this error:               Some packages could not be installed. This may mean that you have     requested an impossible situation or if you are using the unstable     distribution that some required packages have not yet been created or     been moved out of Incoming. The following information may help to     resolve the situation:          The following packages have unmet dependencies:  procps : Depends:     initscripts E: Error, pkgProblemResolver::Resolve generated breaks,     this may be caused by held packages.


How to install ap-hotspot

I can't seem to install ap-hotspot on ubuntu 12.04. I read somewhere that I should run the following commands:               $ sudo su -     # add-apt-repository ppa:nilarimogard/webupd8     # aptitude update     # aptitude install ap-hotspot     # ap-hotspot configure     # ap-hotspot start      But my terminal get stuck on the aptitude update because I get the error `Something wicked happened resolving 'packages.medibuntu.org:http'`. I was told that's because medibuntu has been shut down. So I had to go into `/etc/apt/sources.list.d/` and delete all things related to medibuntu before I could run aptitude update again. Then I tried to run `apt-get install ap-hotspot`, but I got the error               The following packages have unmet dependencies:      ap-hotspot : Depends: dnsmasq but it is not going to be installed      So then I ran the `apt-get install dnsmasq`, but i got the error:               The following packages have unmet dependencies:      dnsmasq : Depends: dnsmasq-base (>= 2.59-4) but it is not going to be installed      So then I ran the `apt-get install dnsmasq-base` but i got the message:               dnsmasq-base is already the newest version.     0 upgraded, 0 newly installed, 0 to remove and 260 not upgraded.      So how do i get ap-hotspot to work?


bash + Is there something like log4j for bash script?

Is there something like `log4j` for bash script? I would like to be able to treat errors differently based on their severity. For example, `log4j` allows me to differentiate between errors, info, debug, etc. Is there a way I can do that for bash? I know, I can just write a function , that write to log as the following example:               LOG ()  {                 echo `date` $* >> /var/log/my_log.log              }       But actually I want to know if something like log4j is relevant for bash in order to get the ability for – **error level** and etc


Auto ecryptfs mounting only works after cloning

Weird problem, I have an auto ecryptfs setup on a machine. I have an init.d script which is setup to automount the ecryptfs. It was working at one point, and even now if I run the script directly it mounts. However, it no longer works automatically now. The weird part is, if I clone the system using Clonezilla, the cloned machine works OK and gets automounted. Any thoughts on how to troubleshoot this?


File permissions

I have a PHP script running which makes symlinks. To confirm which user it is:               file_put_contents("testFile", "test");     $user = fileowner("testFile");     unlink("testFile");     echo "running as user '" . $user . "'";     var_dump( exec('whoami'));      running like this ...               $ php script.php      runs correct all symlinks are made and output is:               running as user '999'string(5) "admin"      Running through a shell script:               #!/bin/sh     php /path/to/script.php      gives the following output and doesn't work: > PHP Warning: symlink(): Permission denied in /path/to/script.php on line 8 > running as user '999'string(5) "admin" I'm not sure what the difference between the two is, as the users they are running as are identical. Any suggestions on how to make them both have the correct permissions for symlinking? Edit: `cat /proc/version` gives `Linux version 2.6.39 (root@cross-builder) (gcc version 4.6.3 (x86 32-bit toolchain - ASUSTOR Inc.) ) #1 SMP PREEMPT Thu Oct 31 21:27:37 CST 2013` Thats the only output I can generate for any sort of release information edit2: all of the code               $files = scandir('/volume1/dir1');     $base = "/volume1/";     foreach($files as $file) {             $f_letter = $file{0};             $new_path = $base . "ByLetter/" . strtoupper($f_letter) . "/" . $file;             if(ctype_alpha ($f_letter) && !is_link($new_path)) {                     var_dump($base. "TV/" . $file);                     var_dump($new_path);                     symlink ($base . "TV/" . $file , $new_path);             }               }      Running gives the same output for the var dumps both methods


Unicode support in talk?

I live in Poland, and we have some accented characters - ąćęłńóśźż. Due to various reasons I resurrected "talk" usage on my server, which works great, but I wasn't able to figure out how to make it work with accents. On both ends of talk I have UTF-8 based locale (en_US.UTF-8), and polish characters work great in everything - bash, vim, mutt, slrn, everything, but talk. What is the reason of the problem, and how could it be solved? I'm using it on Debian testing, and have tried talk/utalk/inetutils-talk, and none of them seems to support unicode/utf8. What can be done to achieve "talk" with full utf8 support?