Showing posts with label ubuntu. Show all posts
Showing posts with label ubuntu. Show all posts

Tuesday, 29 September 2015

How to connect to WiFi using command line Ubuntu, Debian etc.

Tried to upgrade to Ubuntu 15.10 Beta 2, rebooted  and my system was broken. Could not connect to LAN, so my only option was to connect to Wifi via command line to hopefully repair my system.

This is what I did.

First, open a terminal:

Ctrl-Alt-T

If you got WPA like me you need wpa_supplicant to set it up, because iw can only handle WEP.

To bring up your wireless device (most likely wlan0):
sudo -s
ifconfig wlan0 up
#now scan for available wifi networks and note the ssid of your device
iwlist wlan0 scan
In /etc/wpa_supplicant.conf we need to put our ssid and password:
nano /etc/wpa_supplicant.conf
Example config:
network={
                     ssid="ssid"
                     psk="wifi password"
}

Ctrl + A to close and save.
To connect:
sudo wpa_supplicant -B -iwlan0 -c/etc/wpa_supplicant.conf -Dwext
Open a second tab/terminal:
sudo dhclient wlan0
Your connection should now work!

Friday, 28 August 2015

How to install I2P on Ubuntu

Open a terminal and enter:

sudo apt-add-repository ppa:i2p-maintainers/i2p

Update your repositories and install i2p:

sudo apt-get update
sudo apt-get install i2p

Start the I2P router (never as root):

i2prouter start

Configure your browser to connect through I2P. I'd recommend you to use Firefox.

Preferences --> Advanced --> Network tab.

In the Connections section, click on the Settings button. Click the circle next to Manual proxy configuration, enter 127.0.0.1, port 4444 in the HTTP Proxy field. Enter 127.0.0.1, port 4445 in the SSL Proxy field. Add localhost and 127.0.0.1 into the "No Proxy for" box.


Saturday, 20 June 2015

How to Register a User Name on IRC/Freenode



I am using pidgin in this guide, but any irc client should be ok.


To install pidgin.
sudo apt-get install pidgin

Add Account
Accounts --> Manage Accounts --> Add

Join a Chat
Buddies - Join a Chat

Register account
/msg NickServ REGISTER password youremail@example.com



Check your email. Follow instructions. Done!

Sunday, 31 May 2015

Sunday, 19 October 2014

How To Extract Page(s) From A Single PDF File Using Command Line

PDFtk allows users to perform common pdf tasks from the command line such as merging or splitting PDF files and pages.










To install the program:
sudo apt-get install pdftk

To extract a page from an existing pdf file. For instance just the first page (A1):
pdftk A=/home/user/Desktop/cv.pdf  cat A1 output outfile.pdf

Friday, 18 July 2014

Tuesday, 1 April 2014

Sunday, 16 March 2014

Automatically Reconnect WIFI (Debian, Ubuntu etc.)

The Problem

For several reason I do not have access to LAN and thus have to rely on WIFI for my mining rigs. It is fine for most of the time, but the shit hits the fan, when the connection drops for one reason or another.


The Solution
#!/bin/bash

wlan=`/sbin/ifconfig wlan1 | grep inet\ addr | wc -l`
if [ $wlan -eq 0 ]; then
service network-manager restart
else
echo WIFI IS UP
fi
Note: It's either wlan0 or wlan1. Check with sudo ifconfig.

Save the script and make it executable.

sudo chmod +x filename.sh

Now there are several ways of making sure that our script is being executed every x minutes. The easiest way of accomplishing that I think is by using the command watch.
sudo su
watch -n 600 sh filename.sh

What it does is execute our filename.sh script every 600 seconds.

Or you implement a so called cron job  

sudo crontab -e

Add the following

PATH=/usr/sbin:/usr/bin:/sbin:/bin
*/5 * * * * sh /home/username/filename.sh

*/5 * * * * means that the task will run every 5 minutes.

Monday, 3 March 2014

Adding a Watermark To a Video Via Shell

Recently I wanted to add a watermark to one of my videos. Obviously there are two possible ways of achieving this in Linux.

 
Sample Watermark


Via command line
avconv -i input.mpg -vf “movie=watermark.png [watermark];[in][watermark] overlay=0:0 [out]” -c:v mpeg2video -an output1.mpg 

Via Openshot (text)

Openshot Video Editor is a free, open-source video editor for Linux licensed under the GPL version 3.0. http://www.openshot.org/

sudo apt-get install openshot

Open the program.
CTRL + T
Choose Footer
Create New Title: <Enter your watermark>
First color option: Pick your desired colour
Second color option: Set Opacity to 0
Apply and drag and drop to Track.

Saturday, 1 March 2014

Public Key Authentication SSH (Debian, Ubuntu)

Generate RSA keys on Client

mkdir ~/.ssh 
chmod 700 ~/.ssh 
ssh-keygen -t rsa -b 4096

Transfer Client Key to Host

ssh-copy-id username@host

Test

ssh username@host

Disable Password Authentication On Host

sudo nano /etc/ssh/sshd_config


Look for <#PasswordAuthentication yes> and change it to <no>.

Restart SSH

sudo service ssh restart

DONE

Wednesday, 26 February 2014

How To Monitor Failed SSH Attempts

Disable Password Authentication for better Security

More about SSH can be found here.

You might be astonished how many people try to break into your computer via ssh. It is advisable to use key-based authentication only. Article for key-based authentication.

Enable monitoring

sudo gedit /etc/ssh/sshd_config
--> change LogLevel INFO to LogLevel VERBOSE

SSH login attempts will now be saved in your /var/log/auth.log file.

Accessing the information

sudo cat /var/log/auth.log | grep sshd
sudo cat /var/log/auth.log | grep Fail

sudo cat /var/log/auth.log | grep Invalid

Disabling SSH all-together

sudo mv /etc/init/ssh.conf /etc/init/ssh.conf.disabled

Tuesday, 25 June 2013

YouTube to mp3 Linux (Ubuntu, Mint, Debian)

This guide will show you how to easily convert YouTube Videos to MP3 on Ubuntu or Debian.

youtube-dl  is a Linux command-line tool for downloading/converting videos. The tool supports YouTube and many other websites such as BBC.

For Ubuntu systems (or systems that are based on it such as Linux Mint)

sudo apt-get install youtube-dl

For Debian

sudo wget https://yt-dl.org/downloads/2014.03.25.1/youtube-dl -O /usr/local/bin/youtube-dl
sudo chmod a+x /usr/local/bin/youtube-dl
Also, make sure ffmpeg is installed
sudo apt-get install ffmpeg

Before you do anything, update to the latest version of youtube-dl

sudo youtube-dl -U

Once it is installed use the following command to convert YouTube videos to mp3

youtube-dl --extract-audio  --audio-format mp3  <youtube-link>

If you want  an overview of all the different options

youtube-dl --help

Supported sites as of March, 2014

  • 1up.com
  • 220.ro
  • 3sat
  • 4tube
  • 56.com
  • 5min
  • 8tracks
  • 9gag
  • AcademicEarth:Course
  • AddAnime
  • Aftonbladet
  • anitube.se
  • Aparat
  • AppleTrailers
  • archive.org: archive.org videos
  • ARD
  • arte.tv
  • arte.tv:+7
  • arte.tv:concert
  • arte.tv:creative
  • arte.tv:ddc
  • arte.tv:embed
  • arte.tv:future
  • AUEngine
  • bambuser
  • bambuser:channel
  • Bandcamp
  • Bandcamp:album
  • bbc.co.uk: BBC iPlayer
  • blinkx
  • blip.tv:user
  • BlipTV
  • Bloomberg
  • BR: Bayerischer Rundfunk Mediathek
  • Break
  • Brightcove
  • BYUtv
  • Canal13cl
  • canalc2.tv
  • canalplus.fr
  • CBS
  • CeskaTelevize
  • channel9: Channel 9
  • Chilloutzone
  • Cinemassacre
  • clipfish
  • cliphunter
  • Clipsyndicate
  • cmt.com
  • CNN
  • CNNBlogs
  • CollegeHumor
  • ComedyCentral
  • ComedyCentralShows: The Daily Show / The Colbert Report
  • CondeNast: Condé Nast media group: GQ, Glamour, Vanity Fair, Vogue, W Magazine, WIRED
  • Criterion
  • Crunchyroll
  • CSpan: C-SPAN
  • culturebox.francetvinfo.fr
  • d8.tv
  • dailymotion
  • dailymotion:playlist
  • dailymotion:user
  • daum.net
  • defense.gouv.fr
  • Discovery
  • Dotsub
  • Dropbox
  • EbaumsWorld
  • eHow
  • eitb.tv
  • ElPais: El País
  • Engadget
  • Escapist
  • EveryonesMixtape
  • exfm: ex.fm
  • ExtremeTube
  • facebook
  • faz.net
  • fernsehkritik.tv
  • fernsehkritik.tv:postecke
  • Firstpost.com
  • firsttv: Видеоархив - Первый канал
  • Flickr
  • france2.fr:generation-quoi
  • FranceInter
  • francetv: France 2, 3, 4, 5 and Ô
  • francetvinfo.fr
  • Freesound
  • freespeech.org
  • FunnyOrDie
  • Gamekings
  • GameSpot
  • Gametrailers
  • GDCVault
  • generic: Generic downloader that works on some sites
  • Hark
  • Helsinki: helsinki.fi
  • HotNewHipHop
  • Howcast
  • HuffPost: Huffington Post
  • Hypem
  • ign.com
  • imdb: Internet Movie Database trailers
  • imdb:list: Internet Movie Database lists
  • Ina
  • InfoQ
  • Instagram
  • instagram:user: Instagram user profile
  • InternetVideoArchive
  • IPrima
  • ivi: ivi.ru
  • ivi:compilation: ivi.ru compilations
  • JadoreCettePub
  • JeuxVideo
  • jpopsuki.tv
  • Jukebox
  • justin.tv
  • Kankan
  • keek
  • KeezMovies
  • KhanAcademy
  • KickStarter
  • kontrtube: KontrTube.ru - Труба зовёт
  • la7.tv
  • lifenews: LIFE | NEWS
  • LiveLeak
  • livestream
  • livestream:original
  • lynda: lynda.com videos
  • lynda:course: lynda.com online courses
  • m6
  • macgamestore: MacGameStore trailers
  • mailru: Видео@Mail.Ru
  • Malemotion
  • MDR
  • metacafe
  • Metacritic
  • mixcloud
  • Mofosex
  • mooshare: Mooshare.biz
  • MPORA
  • MTV
  • mtviggy.com
  • muzu.tv
  • MySpace
  • MySpass
  • myvideo
  • Naver
  • NBA
  • NBC
  • NBCNews
  • ndr: NDR.de - Mediathek
  • NDTV
  • Newgrounds
  • nfb: National Film Board of Canada
  • nhl.com
  • nhl.com:videocenter: NHL videocenter category
  • niconico: ニコニコ動画
  • Normalboots
  • novamov: NovaMov
  • Nowness
  • nowvideo: NowVideo
  • ocw.mit.edu
  • on.aol.com
  • Ooyala
  • ORF
  • parliamentlive.tv: UK parliament videos
  • PBS
  • Photobucket
  • Playvid
  • plus.google: Google Plus
  • pluzz.francetv.fr
  • podomatic
  • PornHd
  • PornHub
  • Pornotube
  • prosiebensat1: ProSiebenSat.1 Digital
  • Pyvideo
  • radiofrance
  • RBMARadio
  • RedTube
  • RingTV
  • RottenTomatoes
  • Roxwel
  • RTLnow
  • RTS: RTS.ch
  • rutube: Rutube videos
  • rutube:channel: Rutube channels
  • rutube:movie: Rutube movies
  • rutube:person: Rutube person videos
  • RUTV: RUTV.RU
  • savefrom.net
  • screen.yahoo:search: Yahoo screen search
  • ServingSys
  • Sina
  • Slashdot
  • Slideshare
  • smotri: Smotri.com
  • smotri:broadcast: Smotri.com broadcasts
  • smotri:community: Smotri.com community videos
  • smotri:user: Smotri.com user videos
  • Sohu
  • soundcloud
  • soundcloud:set
  • soundcloud:user
  • southpark.de
  • southparkstudios.com
  • Space
  • Spankwire
  • Spiegel
  • Spike
  • stanfordoc: Stanford Open ClassRoom
  • Statigram
  • Steam
  • streamcloud.eu
  • StreamCZ
  • Syfy
  • SztvHu
  • Teamcoco
  • TechTalks
  • techtv.mit.edu
  • TED
  • TF1
  • ThePlatform
  • ThisAV
  • tinypic: tinypic.com videos
  • tou.tv
  • Toypics: Toypics user profile
  • ToypicsUser: Toypics user profile
  • TrailerAddict (Currently broken)
  • Trilulilu
  • TruTube
  • Tube8
  • Tudou
  • Tumblr
  • Tutv
  • tvigle: Интернет-телевидение Tvigle.ru
  • tvp.pl
  • udemy
  • udemy:course
  • Unistra
  • ustream
  • ustream:channel
  • Vbox7
  • VeeHD
  • Veoh
  • Vesti: Вести.Ru
  • Vevo
  • Vice
  • Viddler
  • video.google:search: Google Video search
  • video.mit.edu
  • VideoBam
  • VideoDetective
  • videofy.me
  • videolectures.net
  • VideoPremium
  • viki
  • vimeo
  • vimeo:album
  • vimeo:channel
  • vimeo:group
  • vimeo:review: Review pages on vimeo
  • vimeo:user
  • Vine
  • vk.com
  • vube: Vube.com
  • WashingtonPost
  • wat.tv
  • WDR
  • Weibo
  • Wimp
  • Wistia
  • WorldStarHipHop
  • XBef
  • XHamster
  • XNXX
  • XTube
  • XTubeUser: XTube user profile
  • XVideos
  • Yahoo: Yahoo screen
  • yahoo:news: Yahoo screen
  • YouJizz
  • Youku
  • YouPorn
  • youtube: YouTube.com
  • youtube:channel: YouTube.com channels
  • youtube:favorites: YouTube.com favourite videos, "ytfav" keyword (requires authentication)
  • youtube:history: Youtube watch history, "ythistory" keyword (requires authentication)
  • youtube:playlist: YouTube.com playlists
  • youtube:recommended: YouTube.com recommended videos, "ytrec" keyword (requires authentication)
  • youtube:search: YouTube.com searches
  • youtube:search:date: YouTube.com searches, newest videos first
  • youtube:search_url: YouTube.com search URLs
  • youtube:show: YouTube.com (multi-season) shows
  • youtube:subscriptions: YouTube.com subscriptions feed, "ytsubs" keyword(requires authentication)
  • youtube:toplist: YouTube.com top lists, "yttoplist:{channel}:{list title}" (Example: "yttoplist:music:Top Tracks")
  • youtube:user: YouTube.com user videos (URL or "ytuser" keyword)
  • youtube:watch_later: Youtube watch later list, "ytwatchlater" keyword (requires authentication)
  • ZDF


Wednesday, 15 May 2013

How to turn off animations in Linux Mint (Mate)



UPDATE: Check bottom of page.
If you find them as annoying as me, follow the steps:

ALT + F2
mateconf-editor

Go to desktop - mate - interface

Look for enable_animations and uncheck.

Done.

Update Jan 2014

Mateconf-editor has been replaced.
sudo apt-get install dconf-tools


dconf-tools

Update July 2015

Open terminal
sudo dconf-editor

Org/mate/desktop/interface and uncheck enable_animations.

and

org/mate/marco/general and check reduced_resources.

Thursday, 17 January 2013

Monday, 12 November 2012

Scid vs PC installation guide - Ubuntu (Mint, Debian etc.)

Scid vs PC

Scid vs PC is definitely the best and most comprehensive chess software for Linux.  Unfortunately I struggled quite a bit to get it up and running.

Before I start: You might prefer to watch the video. Otherwise keep on reading.


Open a terminal and execute the following commands

sudo apt-get install auto-apt build-essential
sudo auto-apt update-local
sudo auto-apt update
sudo auto-apt updatedb

Now make sure you got both tcl8.5-dev and tk8.5-dev installed

sudo apt-get install tcl8.5-dev tcl8.5
sudo apt-get install tk8.5-dev tk8.5

Some users are reporting problems on Ubuntu 14.04.
sudo apt-get install tcl8.6-dev tcl8.6
sudo apt-get install tk8.6-dev tk8.6 libgcj15-dev

The 'x' refers to the current release: e.g. 4.9.tgz
download scid vs pc: http://sourceforge.net/projects/scidvspc/files/source/scid_vs_pc-4.9.tgz/download
tar -xzf scid_vs_pc-4.xx.tgz
cd scid_vs_pc-4.x 
sudo auto-apt run ./configure
sudo auto-apt run make
sudo auto-apt run make install
This should work. If you encounter any problems, please let me know.