First, execute: apt-get install cifs-utils
After create this file on your folder: vi /usr/local/bin/timecapsule
Put this code:
#!/bin/bash
#
# This program is free software. It comes without any warranty, to
# the extent permitted by applicable law. You can redistribute it
# and/or modify it under the terms of the Do What The Fuck You Want
# To Public License, Version 2, as published by Sam Hocevar. See
# http://sam.zoy.org/wtfpl/COPYING for more details.
#
# Version 3, enhanced for Ubuntu 13.X+, Fedora 19+, and similar distros.
# Runs on all GNU/Linux distros (install cifs-utils)
# Author: Daniel Graziotin <dgraziotin AT task3 DOT cc> - http://task3.cc
# Purpose: Check if there is a TimeCapsule in your network and mount it
# for use it under Gnu/Linux. Unmount it if it is already mounted.
# The mount point is created and destroyed after use (for prevent
# automatic backup software to backup in the directory if the device
# is not mounted)
# Instructions:
# 1) Install cifs-utils (sudo apt-get install cifs-utils)
# 1) Change the first four variables according to your configuration.
# 2) Run this program at boot when your network is already
# set up. Also, run it on logoff to umount Time Capsule.
TIMECAPSULE_IP="time capsule ip" # e.g. "192.168.1.100"
TIMECAPSULE_VOLUME="<first volume>" # also try "/Data"
TIMECAPSULE_PASSWORD="your pass" # prefix special characters, e.g. \!
MOUNT_POINT=/mnt/timecapsule # no need to create the directory
IS_MOUNTED=`mount 2> /dev/null | grep "$MOUNT_POINT" | cut -d' ' -f3`
TIMECAPSULE_PATH="//$TIMECAPSULE_IP$TIMECAPSULE_VOLUME"
if [[ "$IS_MOUNTED" ]] ;then
umount $MOUNT_POINT
rmdir $MOUNT_POINT
else
CHECK_TIMECAPSULE=`smbclient --no-pass -L $TIMECAPSULE_IP 2>&1 > /dev/null | grep -m1 -i apple`
if [[ "$CHECK_TIMECAPSULE" =~ "Apple" ]] ;then
mkdir $MOUNT_POINT
echo "mount.cifs $TIMECAPSULE_PATH $MOUNT_POINT -o pass=$TIMECAPSULE_PASSWORD,file_mode=0777,dir_mode=0777,sec=ntlm" | /bin/bash
fi
fi
##############end script#############################
chmod +x timecapsule
After that start script ./usr/local/bin/timecapsule
Obs.: If you need umount something, just execute the script again, worked very fine.
Congratulations for my friend: Daniel Graziotin
source: https://ineed.coffee/418/how-to-automatically-mount-and-umount-apple-time-capsule-on-linux/
sábado, 19 de dezembro de 2015
sexta-feira, 18 de dezembro de 2015
HOW TO IMPROVE YOUR HTOP
mkdir -p ~/.config/htop/
vi ~/.config/htop/htoprc
copy and past just that inside of file:
# Beware! This file is rewritten by htop when settings are changed in the interface.
# The parser is also very primitive, and not human-friendly.
fields=0 48 17 18 38 39 40 2 46 47 49 1
sort_key=46
sort_direction=1
hide_threads=0
hide_kernel_threads=1
hide_userland_threads=0
shadow_other_users=0
show_thread_names=0
highlight_base_name=1
highlight_megabytes=1
highlight_threads=1
tree_view=1
header_margin=0
detailed_cpu_time=0
cpu_count_from_zero=0
update_process_names=1
account_guest_in_cpu_meter=0
color_scheme=0
delay=15
left_meters=AllCPUs Memory Swap
left_meter_modes=1 1 1
right_meters=Tasks LoadAverage Uptime Clock Hostname
right_meter_modes=2 2 2 2 2 1
vi ~/.config/htop/htoprc
copy and past just that inside of file:
# Beware! This file is rewritten by htop when settings are changed in the interface.
# The parser is also very primitive, and not human-friendly.
fields=0 48 17 18 38 39 40 2 46 47 49 1
sort_key=46
sort_direction=1
hide_threads=0
hide_kernel_threads=1
hide_userland_threads=0
shadow_other_users=0
show_thread_names=0
highlight_base_name=1
highlight_megabytes=1
highlight_threads=1
tree_view=1
header_margin=0
detailed_cpu_time=0
cpu_count_from_zero=0
update_process_names=1
account_guest_in_cpu_meter=0
color_scheme=0
delay=15
left_meters=AllCPUs Memory Swap
left_meter_modes=1 1 1
right_meters=Tasks LoadAverage Uptime Clock Hostname
right_meter_modes=2 2 2 2 2 1
segunda-feira, 30 de novembro de 2015
HOW TO CREATE A CUSTOM BUSINESS CARD IN LINUX
So, today i will explain, how to create a custom business cards in Linux:
First of all start hist command:
apt-get install glabels
After that find glabes app to open to make:
set the size that you preffear and input some information and that right and conclude your business card.
First of all start hist command:
apt-get install glabels
After that find glabes app to open to make:
set the size that you preffear and input some information and that right and conclude your business card.
sexta-feira, 27 de novembro de 2015
HOW TO CHECK BLACK LIST OF MAIL SERVER
Acess this site and put ip server of your mail server
http://www.dnsbl.info/dnsbl-database-check.php
http://www.dnsbl.info/dnsbl-database-check.php
quarta-feira, 28 de outubro de 2015
HOW TO INSTALL AMMYY ON LINUX UBUNTU
First of all,:
apt-get update
apt-get install wine
apt-get install winetricks
After that, open winetricks on terminal or executing this name by terminal;
Now, click on "Select the default wineprefix"
After, click ok and will appear the message
"Wold you like to help winetricks deveopment by letting winetricks reprot statistic? You can turn reporting off at any time with the command "winetricks --optout""
Click on yes/ok, and next step;
Click on install a windows Dll or component, after that , set the itens:
mfc40,mfc42, vcrun6 and vcrun6sp6
After, access http://www.ammyy.com/pt/downloads.html
do the ammy download, and enjoy..
apt-get update
apt-get install wine
apt-get install winetricks
After that, open winetricks on terminal or executing this name by terminal;
Now, click on "Select the default wineprefix"
After, click ok and will appear the message
"Wold you like to help winetricks deveopment by letting winetricks reprot statistic? You can turn reporting off at any time with the command "winetricks --optout""
Click on yes/ok, and next step;
Click on install a windows Dll or component, after that , set the itens:
mfc40,mfc42, vcrun6 and vcrun6sp6
After, access http://www.ammyy.com/pt/downloads.html
do the ammy download, and enjoy..
domingo, 20 de setembro de 2015
HOW TO RUN NETFLIX ON LINUX
This procedure was tested on ubuntu 14.04,15 and ubuntu gnome.
# apt-get install wine
# apt-get install winetricks
# apt-add-repository ppa:pipelight/stable
# apt-get update
# apt-get install pipelight-multi
# pipelight-plugin --enable silverlight
# apt-get install netflix-desktop
# apt-get install wine
# apt-get install winetricks
# apt-add-repository ppa:pipelight/stable
# apt-get update
# apt-get install pipelight-multi
# pipelight-plugin --enable silverlight
# apt-get install netflix-desktop
HOW TO CREATE A BOOT IMAGE FROM LINUX FOR LINUX
First umount the unit:
umount /dev/sdb1
After:
mkfs.vfat /dev/sdb1
Download the software " Live usb install" from this link for a deb distribution package: http://live.learnfree.eu/download/
After that realize the instalation by the default command dpkg -i <packet name>.deb
After instalation execute the software and set IMG write on mode option:
In Install from set im IMG File your file.iso that you was download to create a image
In install to set the device usb that you want to save the image, maybe do not appear the device, please, set the botton in right side to refresh the devices.
And after click in OK to start the procedure to create the image.
After that just do the test:
umount /dev/sdb1
After:
mkfs.vfat /dev/sdb1
Download the software " Live usb install" from this link for a deb distribution package: http://live.learnfree.eu/download/
After that realize the instalation by the default command dpkg -i <packet name>.deb
After instalation execute the software and set IMG write on mode option:
In Install from set im IMG File your file.iso that you was download to create a image
In install to set the device usb that you want to save the image, maybe do not appear the device, please, set the botton in right side to refresh the devices.
And after click in OK to start the procedure to create the image.
After that just do the test:
Assinar:
Postagens (Atom)