PPTP VPN connection from ubuntu
Connecting to windows pptp (VPN) server can be done from Ubuntu too! All you need is pptp-linux and network-manager-pptp packages.
After installing the packages, PPTP support is integrated nicely in the ubuntu UI. To see the VPN settings, click on the network icon in the tray bar and choose VPN Connections -> Configure VPN…
Gateway should be the ip address (or host name) of the vpn server. User name doesn’t have to contain the doman. I don’t like to use the password remember feature because then it is so easy to find out the password using the ’show password’ checkbox.
I found out that advanced settings need some adjustment for optimal performance. I disabled PAP and EAP authentication methods by unchecking them. I use Point-to-point encryption (MPPE) with 128bit security and allowing stateful encryption. I’ve also checked BSD, Deflate and TCP header data compression. Send PPP echo packets is also enabled.
Now we still need to configure routing settings for the vpn connection. Without configuring routing I found out that the connection was very slow when surfing the internet. Routing settings can be found from the IPv4 Settings tab and click “Routes…” button. I’ve added route with following properties:
address 192.168.1.0
netmask 255.255.255.0
gateway 192.168.1.1
Using anacrontab in ubuntu (backintime as example)
Anacron is similar to cron, a tool to schelude programs on linux systems. The only difference is that anacron does not assume that computer is online all the time. Anacron executes missed commands on boot. Anacron requires root access, unlike cron which can schelude tasks for non root users too. Anacron cannot schelude recurring tasks with a period less than a day. For example, anacron cannot be used to schelude a recurring task with a period of an hour (hourly task).
Anacrontab has anacrontab, similar to crontab, located in /etc/anacrontab. My ubuntu installation has the following contents as default
# /etc/anacrontab: configuration file for anacron # See anacron(8) and anacrontab(5) for details. SHELL=/bin/sh PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin # These replace cron's entries 1 5 cron.daily nice run-parts --report /etc/cron.daily 7 10 cron.weekly nice run-parts --report /etc/cron.weekly @monthly 15 cron.monthly nice run-parts --report /etc/cron.monthly
First column means period, 1 equals daily, 7 equals weekly and @monthly equals monthly. Second column means delay which is the delay (in minutes) the commands will be executed after system start. For example daily commands will be executed 5 minutes after start each day.
We can see that anacron is configured to launch scripts in /etc/cron.daily, /etc/cron.weekly and /etc/cron.monthly folders. Simple enough.
If we want to add a daily script, we just make a new script in /etc/cron.weekly folder (you can use other scripts as examples) and give it execution permissions by
sudo chmod +x /etc/cron.xxxx/scriptName (xxxx replaced by daily, weekly or monthly)
One important thing to remember is that script name cannot contain periods! This is a known anacron bug.
For excellent backup program, Back In Time, following script (/etc/cron.daily/back-in-time) will schelude the daily back up daily:
#!/bin/sh nice -n 19 /usr/bin/backintime --backup-job >/dev/null 2>&1
Anacron is a perfect scheluding tool for desktop ubuntu systems.
EDIT:
I was wondering one day why anacrob ‘replaces’ crontab when it comes to daily, weekly or monthly jobs. Ubuntu default system-wide crontab looks something like this:
# /etc/crontab: system-wide crontab
# Unlike any other crontab you don’t have to run the `crontab’
# command to install the new version when you edit this file
# and files in /etc/cron.d. These files also have username fields,
# that none of the other crontabs do.SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin# m h dom mon dow user command
17 * * * * root cd / && run-parts –report /etc/cron.hourly
25 11 * * * root test -x /usr/sbin/anacron || ( cd / && run-parts –report /etc/cron.daily )
47 11 * * 7 root test -x /usr/sbin/anacron || ( cd / && run-parts –report /etc/cron.weekly )
52 11 1 * * root test -x /usr/sbin/anacron || ( cd / && run-parts –report /etc/cron.monthly )
#
Crontab cleverly uses test -x to find if /usr/sbin/anacron exists and has executable bit set. If true, nothing is done. If anacron is not installed, all scripts in /etc/cron.xxxx are executed. This is why (system-wide) crontab does not nothing when anacrontab is installed.
Beagle no space left on device error on ubuntu
If you get ‘no space left on device’ when opening beagle settings, the reason might not be disk space. Beagle uses inotify service if it’s available. Inotify notifies beagle on file system changes. The problem is too low number of inotify watches.
The fix for the problem is quite simple and documented. We need to increase inotify watches by executing following command as root:
echo 16384 > /proc/sys/fs/inotify/max_user_watches
Source: http://beagle-project.org/Troubleshooting (Beagle loops on directories)
Above command increases the limit to 16384 which is usually enough. Unfortunately max_user_watches limit is reseted on computer restart. The solution is to make a start up script which executes above command automatically.
Start up script can be created by
sudo gedit /etc/init.d/beagleFix
and entering following to the text file
#!/bin/sh echo 16384 > /proc/sys/fs/inotify/max_user_watches
After this, we have to make the script executable:
sudo chmod +x /etc/init.d/beagleFix
To make the script start every time we must run the following command as root
update-rc.d beagleFix defaults
USB Drive letters changing in Windows?
Try this program:
USBDLM
It allows user to make ntfs folder mounts automatically, similar to unix systems.
[Settings]
DeleteMountPointsOnRemoval=1
WriteDebugInfo=1
LogLevel=3
WriteLogFile=1
LogFile=D:\Apps\USBDLM\USBDLM.LOG
;
;Remove unused folder mounts
[DeleteUnusedNtfsMountpoints]
Folder1=C:\mount\
;
;If drive has usbdlm.ini file, use it! Otherwise assign drive letter manually
;Not that by default this works only for USB drives, add BusType definitions
;to process Firewire drives too
[DriveLetters]
Letters=%drive%\usbdlm.ini
Letter1=H
Letter2=I
Letter3=J
Letter4=K
Letter5=L
Letter6=N
;
;If you want to hide particular devices from "safe remove" hardware dialog
;[HideFromSafelyRemoveHardware]
;DeviceID1=USB\VID_0424&PID_2228\26020128B005
;DeviceID2=USB\VID_0424&PID_2602\6&1B3E90B3&0&1
Now, the usb drive should have a configuration file, usbdlm.ini, with the following contents:
[DriveLetters]
Letter1=C:\mount\usbdrive
Much more information is found in the program manual.
Disabling “Open File – Security Warning dialog” in Vista (and XP SP2 onwards)
After little bit of googling I found how to remove that annoying security warning dialog (see image). This should also work in Windows XP. Here’s how to define file types ‘less risky’.
- Run Local group policy editor by entering following command in the start menu “gpedit.msc”
- Open User configuration/Administrative Templates/Windows Components/Attachment Manager and double click on the setting called “Inclusion list for moderate risk file types”.
- Click ‘Enabled’ and write file types you want to run without the open file security confirmation. I have “.exe;.msi” in the text box (see image).
You could also use setting called “Inclusion list for low risk file types”. Remember that changing either one of the settings is weakening your security! Open file security warning prevents accidental opening of email attachments, for example.
Edit: To remove confirmation dialog only from files that are opened from network drives you should consider other options (adding UNC paths to trusted sites, for example).
Vista 64bit video preview thumbnailit explorerissa
Lataa guliverkli2:lta (SourceForge) 64bittiset versiot mediasplittereistä MatroskaSplitter.ax MP4Splitter.ax MPegSplitter.ax OggSplitter.ax. Sen lisäksi lataa ffdshow-tryouts 64bit versio ja aseta se purkamaan haluamasi formaatit. Tämän jälkeen rekisteröi .ax-splitterit seuraavalla command line skriptillä:
@echo off
echo copying files to system32…
d:
cd D:\Apps\Video Splitters for 64bit (thumb gen)
copy /Y *.ax c:\windows\system32
c:
cd c:\windows\system32
regsvr32 MatroskaSplitter.ax
regsvr32 MpegSplitter.ax
regsvr32 MP4Splitter.ax
regsvr32 OggSplitter.ax
echo filters registered
pause
Uninstall proseduuri:
@echo off
c:
cd c:\windows\system32
regsvr32 /u MatroskaSplitter.ax
regsvr32 /u MpegSplitter.ax
regsvr32 /u MP4Splitter.ax
regsvr32 /u OggSplitter.ax
echo removing filters from system32
del MatroskaSplitter.ax
del MpegSplitter.ax
del MP4Splitter.ax
del OggSplitter.ax
echo filters UNregistered
pause
Secure rippien poltto
Sinä:
1. olet ripannut “turvallisesti” EACilla cd:n flaceiksi ja cuesheetiksi. Cuesheet on ns. “noncompliant”, joka sisältää kappaleiden pregapit.
2. haluat polttaa levyn, mahdollisimman lähellä oikeata, varsinkin gappien suhteen
Ratkaisu:
1. Lataa burrrn (http://www.burrrn.net/?page_id=4). Se muuntaa flacit “lennossa” waveiksi ja polttaa ne käyttäen cuesheettiä.
Ongelma:
1. Cuesheetissä on viittauksia wav-tiedostoihin mutta sinulla on enää jäljellä flac-tiedostot
Ratkaisu:
1. Tekemäni ohjelma hakee kaikki flac-tiedostot ohjelmalle annetun cue sheetin kansiosta. Sen jälkeen ohjelma järjestää löydetyt flac-tiedostot luonnolliseen järjestykseen (esim. “10″ suurempi kuin “1″). Lopuksi ohjelma tekee uuden cuesheetin, joka korvailee jokaisen cue sheetin FILE-merkinnän uudella, viitaten järjestyksessä aiempiin flac-tiedostoihin. Ohjelman luoma cuesheet kelpaa suoraan burrrn-ohjelmalle.
Ohjelm
Avaa DVD:t MPC:llä helposti (tietokoneelta)
Haluatko avata DVD:t koneelta helposti MPC:ssä. Importtaa seuraava .reg tiedosto, niin saat soitettua dvd-kansion hiiren oikealla näppäimellä resurssienhallinnasta.
muista muuttaa media player classicin kansio!
Minulla on käytössä Media Player Classic Home Cinema, mutta ohjelma toimii tavallisella mpc:lläkin.
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Folder\shell\Open As DVD (MPC)]
@=”Open As DVD With MPC”
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Folder\shell\Open As DVD (MPC)\command]
@=”D:\\apps\\Media Player Classic Home Cinema\\mplayerc.exe \”%1\” /dvd”

