Saturday, October 17, 2015

How to Auto Mount NFS in Mac OS X Yosemite! Permanently

etc/auto_master:

/myserver auto_myserver

/etc/auto_myserver.

Add the following lines to this file:

MyShare1 myserver.local:/exported/path/MyShare1
MyShare2 myserver.local:/exported/path/MyShare2

To check if mounting works, run:

sudo automount -vc

The shares should have been moun

http://wied.it/blog/how-to-permanently-mount-a-nfs-share-on-mac-os-x-yosemite-using-automount.html

Sunday, September 13, 2015

x2go viewport issue when remote resolution is higher than client resolution

In that case, moving viewport doesn't work (could be a bug).  But we can use "ctrl+atl+MOVING_MOUSE" to move the viewport!

Thursday, September 10, 2015

How to turn your Ubuntu Unity Window Manager into Grayscale

First, install the packages "compizconfig-settings-manager" and "compiz-plugins-extra". Use this command:
Code:
sudo apt-get install  compiz-plugins-extra compizconfig-settings-manager
Then open the program ccsm (CompizConfig Settings Manager). It contains a plugin called "Opacity, Brightness and Saturation" which controls the opacity, brightness and saturation of windows.

However, after experimenting for a while, it appears that this plugin cannot be applied to the Unity launcher and panel, since probably it's composited differently than the rest of the desktop (this problem also affects the zoom plugin). It means that this plugin can make any part of your screen (desktop background, windows, etc. etc.) black and white BUT the launcher and panel. So, unless someone knows something that I don't, what you're asking for is impossible.

If you are still curious as to how to make a window black and white, then: In ccsm, enable the plugin "Opacity, Brightness and Saturation". Wait a while for Compiz to sort itself out, then open it, go to the "Saturation" tab. On the second "Increase Saturation" entry, click it, choose "Ctrl", "Alt", and "Button4". Same for the second "Decrease Saturation" entry, but "Button5" instead of "Button4".

Now, hover your mouse on any windows, hold Ctrl + Alt and scroll down with the middle mouse button to make your window go black and white! To make it colorful again, Ctrl + Alt + Scroll up. This might be enough to amaze your friend.

http://ubuntuforums.org/showthread.php?t=2143868

Wednesday, June 17, 2015

no common cd rom drive was detected

When installing Debian from external USB harddisk, you might encounter
this error message:

"no common cd rom drive was detected"

Just enter "No" and enter "/dev/sdb"

Reference:

-
https://forums.kali.org/showthread.php?3928-No-common-cd-rom-drive-detected-installing-from-USB-HDD

Monday, June 15, 2015

how to restore grub with encrypted partition (dm-crypt)

If you have an encrypted parition with dm-crypt for "/" and your GRUB
is corrupted (or wiped after installing other operating system onto the
same computer), please follow these tips.

- grub-install and update-grub need to be executed under chroot'ed.

This is the most important tip. You must chroot into the encrypted
partition first.

- cryptsetup luksOpen /dev/sda3 csda3
- mount /dev/mapper/csda3 /mnt/system
- (assuming csda3 is /)
- (assuming sda2 contains an unencrypted /boot for this operating
system)
- mount /dev/sda2 /mnt/system/boot
- mount -o bind /dev/ /mnt/system/dev/
- mount -o bind /proc/ /mnt/system/proc/
- chroot /mnt/system
- grub-install /dev/sda
- update-grub

https://pzolee.blogs.balabit.com/2010/07/grub-helyreallitas-titkositott-es-lvm-particiok-eseten/

Friday, June 12, 2015

Thursday, May 28, 2015

muttator - quicksheet

compose: insert mode, ctrl+i
archive: ctrl+s

Thursday, May 14, 2015

how to convert flv into mp4 with ffmpeg

ffmpeg -i filename.flv -c:v libx264 -crf 19 filename.mp4

Monday, May 4, 2015

The value 'stable' is invalid for APT::Default-Release as such a release is not available in the sources

When apt-get upgrade-ing and you get the below error message,

# apt-get upgrade
Reading package lists... Done
E: The value 'stable' is invalid for APT::Default-Release as such a
release is not available in the sources

Please try commenting the line below in /etc/apt/apt.conf.d/70debconf .

APT::Default-Release "stable";

Monday, March 30, 2015

how to generate ssl certificate request file

% openssl req -new -newkey rsa:2048 -nodes -keyout example.com.key -out
example.com.csr

Friday, January 23, 2015

how to convert pdf to jpg or png with high quality result with imagemagick

If the pdf file contains only images:

 

convert -density 150 -trim input.pdf -quality 100 -sharpen 0xx1.0
output.jpg

 

But, if the pdf file contains both images and text:

 

convert  -density 288 model-of-the-standing-desk.pdf -background white -flatten -resize 80% model-of-the-standing-desk.png

 

You may also need to add this line:

 

 <policy domain="coder" rights="read | write" pattern="PDF" />

 

inside the file /etc/ImageMagick-7/policy.xml

just before the line:

 

 </policymap>


too.