Posts Tagged ‘script’
Ubuntu Natty Narwhal 11.04: Stunning and Beautiful.
Elegant, Clever and Functional… Canonical Have A Winner.
______________________________
OK this article is a work-in-progress and will be updated and edited as I learn more.
______________________________
Tips
- Reading the Release Notes would probably be a good idea… but I never do until something bugs me and I have to go looking for the cause.
- If you are setting mount points in the installer, be aware that you may need to use “Paste” as there is a bug stopping text entry.
That is, all you can choose are the items in the drop down list.
I used gedit to copy my mount points text e.g. “/backup”.
There is a screen-shot of what I am referring to later on in the post. - Use the recommenced Nvidia driver, or you will be sorry ;-)
As an example I tried “173″ but it didn’t cut it on my system.
Current is working very well even with dual monitors :-D - Unity is only designed to work on the left, that is you need to have the launcher on the far left most side of your left most monitor.
Don’t use it in the centre of two screens as this will cause issues. - Dual monitor system Launcher displays on start-up at the left of the right monitor?
[Fix] Swap the dvi cables connecting the graphics card over :-D
Now the left most monitor is the default monitor and you can enable the right most monitor via TwinView. - Unity Mouse & Keyboard Tips Here.
- Show the Month, Date & Locations in the Indicator Here.
- Panel Indicators (See Below). Pastie, syspeek,
Weather Indicator,Indicator Multiloadand Indicator Workspaces. - Remove the “Me Menu”. sudo apt-get remove indicator-me
______________________________
First Thoughts
The Launcher is very slick and well thought out particularly for something this immature.
To add items, open the app, right click and choose “Keep in Launcher “.
You can pick an item and then move it up or down the stack, the mechanics of this are handled in a very cool way :-)
A search for “CCSM” brings up the CompizConfig Settings Manager. This allows you to tweak the “Ubuntu Unity Plugin”. Search is already set for the Super Key. I set F1 for the Launcher and F2 for Run.
There are a lot of different ways to access your applications but if you get lost you can always use “Applications” from the bottom of the Launcher.
As you fill the Launcher with apps you will notice that they start getting stacked at the bottom :-D
Observations
I am playing about with various ways of using the Workplace Switcher…
The one I am having fun with ATM is to have Firefox in one space and Chromium in another. Just clicking on the app in the Launcher and BANG! I am straight into another Workplace… Nice.
______________________________
Installing Natty
I publish to the web as a kind of script that I can follow when installing. You can do this as well, just choose to “Try Ubuntu” not “Install Ubuntu” at the CD prompt. You then get booted into a fully working OS off the CD. You have an install shortcut on the desktop and you can use Firefox to look up this post to help you with the install.
Note that I am performing a Clean Install not an Upgrade. My /home is on its own partition. This enables me to keep 99% of my configuration information, (Application Settings, Desktop, Panels, etc.) and is a huge time saver.
To make life interesting I am swapping the system HD with another and I am also reformatting my /home to ext4 from ext3.
This means I will need to copy all of my data back to /home after the format. I mention this in passing as I may add some extra information in regards to this so I don’t have to look it up the next time :-) .
______________________________
Preparation
Note your Partition details and send to the Web or Gmail, (I use GParted or Systems Monitor).
This will allow you to refer to these screen-shots from Firefox while you are installing.

Set-up
Download an image: 11.04-desktop-amd64.iso or 11.04-desktop-i386.iso
- It is advisable to use VirtualBox to do a dry run of the following in a VM prior to the real thing.
- Backup your system.
- Burn a CD with K3b at 4 speed and check integrity.
- K3b will display a MD5 of the ISO, this should be “7de611b50c283c1755b4007a4feb0379″ for ubuntu-11.04-desktop-amd64.iso.
- Boot the CD and hold down shift key.
Choose language. Choose test integrity. - Reboot, Choose “Try Ubuntu”.
______________________________
Installing
- Wait for the CD files to be uncompressed and loaded.
This will take a while if you don’t have a Linux swap. - On the desktop click the short-cut “Install”.
- I start the Installer and open Firefox on this post so I can check on details e.g. partitions.
- I chose the 3rd option on how to “Allocate drive space”.
- I went through each of the partitions in turn, hitting “change” and setting Type and Mount Point.
- I didn’t have to create or size any partitions as I had used GParted prior to this.
- Double checking is a good idea at this point.
Have you set the correct file system for each partition?
That tick box marked “format”, are you sure? - Reboot when the installer is finished.
______________________________
Post Install Set-up
If needed, install the NVIDIA, or other restricted driver, then reboot.
Add Codecs and Packages
1. Add the Medibuntu Repository.
sudo wget http://www.medibuntu.org/sources.list.d/natty.list --output-document=/etc/apt/sources.list.d/medibuntu.list
sudo apt-get update && sudo apt-get install medibuntu-keyring && sudo apt-get update
2. Automatically Install Favourite Packages.
You will need the following two files:
cleanstart-packages.list.sh
Download the file cleanstart-packages.list.sh.
packages.list
Create the file packages.list and add the code below (click “show source” then hover your mouse over the code and choose “view source” from the toolbar).
Copy and paste into the file you have just created.
################################################################################ # # cleanstart-packages.list.sh # by silverwav - OpenPGP key:03187548 15 Apr 2009 # # Any line starting with a # is ignored as are Blank lines. # Any other lines, the first word is taken as the package name. # ################################################################################ # Add Repositories before you start # Add medibuntu.org repo 1st! # sudo wget http://www.medibuntu.org/sources.list.d/lucid.list --output-document=/etc/apt/sources.list.d/medibuntu.list # sudo apt-get update && sudo apt-get install medibuntu-keyring && sudo apt-get update # #*** Extras ubuntu-restricted-extras - Commonly used restricted packages timer-applet - a countdown timer applet for the GNOME panel #***VMWare build-essential #xinetd #linux-headers-$(uname -r) #***Prefernces compizconfig-settings-manager - Compiz configuration settings manager #simple-ccsm - Simple Compizconfig settings manager hardinfo - UNIX/Linux hardware information #***Administration gparted - GNOME partition editor firestarter - gtk program for managing and observing your firewall bum - graphical runlevel editor nvidia-settings - Tool of configuring the NVIDIA graphics driver #***Accessories revelation - GNOME2 Password manager #parcellite - A lightweight GTK+ clipboard manager glipper - Clipboard manager for the GNOME panel pcmanfm - an extremely fast and lightweight file manager for X gmountiso - a PyGTK GUI to mount your cd images #xfe - lightweight file manager for X11 #gnome-commander - nice and fast file manager for the GNOME desktop #***Accessories - Search catfish - file search tool that support several different engines recoll - Personal full text search package with a QT GUI #***Accessories - Text notecase - hierarchical note manager (aka outliner) emacs - GNU Emacs is the extensible self-documenting text editor. vim-gnome - Vi IMproved - enhanced vi editor - with GNOME2 GUI #***Games #doom-wad-shareware - Shareware game files for the 3D game DOOM #prboom - clone of the legendary first person shooter Doom #***Graphics gimp - The GNU Image Manipulation Program gthumb - an image viewer and browser mtpaint - painting program to create pixel art and manipulate digital photos gwenview – image viewer for KDE 4 kolourpaint4 - simple image editor for KDE 4 kiconedit - icon editor for KDE 4 shotwell - digital photo organizer xpdf - Portable Document Format (PDF) suite ##***Internet pidgin - graphical multi-protocol instant messaging client for X chromium-browser epiphany-browser - Intuitive web browser #***SABnzb+ sabnzbdplus sabnzbdplus-theme-smpl ushare – lightweight UPnP A/V Media Server (x-box) #***Office #***Programming geany - A fast and lightweight IDE meld - graphical tool to diff and merge files regexxer - A visual search and replace tool #***Sound & Video #Add medibuntu.org repo 1st! #***Sound & Video - Codecs w64codecs libdvdcss2 - Simple foundation for reading DVDs - runtime libraries lame - LAME Ain't an MP3 Encoder #***Sound & Video - Player mplayer - The Ultimate Movie Player For Linux - Medibuntu package mplayer-fonts - Fonts for mplayer mplayer-skin-blue - blue skin for mplayer mplayer-skins - Skins for the Ubuntu mplayer Package mplayer-gui – movie player for Unix-like systems #mozilla-mplayer - MPlayer-Plugin for Mozilla vlc - multimedia player and streamer xine-ui - the xine video player, user interface #***Sound & Video - DVD acidrip - ripping and encoding DVD tool using mplayer and mencoder audacity - A fast, cross-platform audio editor avidemux - a free video editor - gtk version devede - program to create video DVDs dvd95 - DVD9 to DVD5 converter dvdrip - perl front end for transcode k3b - A sophisticated KDE CD burning application k9copy - DVD backup tool for KDE mkvtoolnix-gui - mmg a set of tools to work with Matroska files - GUI frontend arista - multimedia transcoder for the GNOME Desktop pitivi - non-linear audio/video editor using GStreamer #***Sound & Video - Sound Tools padevchooser - PulseAudio Device Chooser pavumeter - PulseAudio Volume Meter soundkonverter - audio converter frontend for KDE bbe – sed-like editor for binary files normalize-audio – adjusts the volume of files to a standard volume level mpeg4ip-server – end-to-end system to explore streaming multimedia espeak - A multi-lingual software speech synthesizer #***System Tools samba - a LanManager-like file and printer server for Unix nautilus-gksu - privilege granting extension for nautilus using gksu - Open as Administrator nautilus-open-terminal - nautilus plugin for opening terminals in arbitrary local paths nautilus-actions - nautilus extension to configure programs to launch gconf-editor - An editor for the GConf configuration system sysinfo - UNIX/Linux system information (MONO) bleachbit - delete unnecessary files from the system ttf-liberation - Free fonts with the same metrics as Times, Arial and Courier testdrive - run the daily Ubuntu ISO in a virtual machine
This is a list of the packages that I use, you may have to adjust the list for your system.
For example note that I own a 64bit system which uses Nvidia graphics.
3. Make the script executable.
cd /home/sil/Downloads ls chmod +x ./cleanstart-packages.list.sh
4. Run the script and install the packages.
sudo ./cleanstart-packages.list.sh
Note: Change …/sil/… to your user name.
If a licence pop-up appears, you may need to “page down” to the end and use space/tab, to get to the OK so that you can press enter.
______________________________
Panel Indicators
Start via Alt + F2 “AppName” and enter.
Pastie
sudo add-apt-repository ppa:hel-sheep/pastie
sudo apt-get update
sudo apt-get install pastie
Indicator Workspaces
sudo add-apt-repository ppa:geod/ppa-geod
sudo apt-get update
sudo apt-get install indicator-workspaces
Indicator Syspeek
sudo add-apt-repository ppa:vicox/syspeek
sudo apt-get update
sudo apt-get install syspeek
______________________________
Add PPA Repositories.
Only add these if you want the very latest features.
Low safety, daily packages have not undergone any quality assurance.
Sometimes very safe but sometimes may not work at all.
Firefox-6:
sudo add-apt-repository ppa:silverwave/one-daily-a-month-3
sudo apt-get update sudo apt-get install firefox-trunk
And possibly one of these
sudo add-apt-repository ppa:chromium-daily/beta sudo add-apt-repository ppa:chromium-daily/dev sudo add-apt-repository ppa:chromium-daily/ppa
sudo apt-get update sudo apt-get install chromium-browser
______________________________
Notes
Manual install is needed for NeroDigitalAudio.zip (Details here).
Copy /home to the New Partition
Copy all files, directories and sub-directories from your current /home folder into the new partition:
sudo rsync -axS --exclude='/*/.gvfs' /home/. /media/home/.
Check Copying Worked (from here).
sudo diff -r /home /media/home
Add VirtualBox 4.0 Oracle Repository Here.
Fix Virtualbox Error “Failed to access the USB subsystem” Here.
Copy Packages from ‘ubuntu-mozilla-daily’ to your PPA with Python
Now that the Lucid rush is over and all the builders have been reassigned to the PPA duties I can get on with finishing this little project :-)
Quick and Dirty code for Displaying packages in a PPA, Then Copy from PPA ‘A’ to PPA ‘B’.
Bear in mind that the posted code is just a place holder and will be getting updated.
lp-getPubSo-and-Copy_odam-test.py
#! /usr/bin/env python
#123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789
# 1 2 3 4 5 6 7 8
#silverwave OpenPGP key 03187548
#
print
print 'Connect to Service and Register Application.'
from launchpadlib.launchpad import Launchpad
lp_ = Launchpad.login_with('sapp2', 'edge')
print
print 'Check Configuration.'
this_distro = lp_.distributions["ubuntu"]
print 'Distribution: ' + this_distro.display_name
umd_achive = lp_.people['ubuntu-mozilla-daily'].archive
print 'Copy From Archive: '
print umd_achive.displayname
print
# function #0 - confirm
## {{{ http://code.activestate.com/recipes/541096/ (r1)
def confirm(prompt=None, resp=False):
"""prompts for yes or no response from the user.
Returns True for yes and False for no.
'resp' should be set to the default value
>>> confirm(prompt='Create Directory?', resp=True)
Create Directory? [y]|n:
True
>>> confirm(prompt='Create Directory?', resp=False)
Create Directory? [n]|y:
False
>>> confirm(prompt='Create Directory?', resp=False)
Create Directory? [n]|y: y
True
"""
if prompt is None:
prompt = 'Confirm'
if resp:
prompt = '%s [%s]|%s: ' % (prompt, 'y', 'n')
else:
prompt = '%s [%s]|%s: ' % (prompt, 'n', 'y')
while True:
ans = raw_input(prompt)
if not ans:
return resp
if ans not in ['y', 'Y', 'n', 'N']:
print 'please enter y or n.'
continue
if ans == 'y' or ans == 'Y':
return True
if ans == 'n' or ans == 'N':
return False
## end of http://code.activestate.com/recipes/541096/ }}}
# function #1 - getps
def getps(this_seriesname, this_source):
get_this_series = this_distro.getSeries(name_or_version = this_seriesname)
last_pubapp = umd_achive.getPublishedSources(
exact_match=True,
source_name=this_source,
distro_series=get_this_series
)[0]
result = last_pubapp.source_package_version
print result
return result
# function #2 - copypackage
def copypackage(copy_to_this_ppa,copy_this_souce,copy_this_version):
target = lp_.me.getPPAByName(name=copy_to_this_ppa)
target.syncSource(
source_name=copy_this_souce,
version=copy_this_version,
from_archive=umd_achive,
include_binaries=True,
to_series=None,
to_pocket='Release',
)
print 'Copied to: ' + target.displayname
print 'Package: ' + copy_this_souce + ' - ' + copy_this_version
print
print 'Retrieve the list of Published Packages.'
print
# Main
print 'Copy To TEST Archive:'
print 'Firefox-3.6 Lucid: ' + 'ppa:silverwave/one-daily-a-month'
print 'Firefox-3.7 Lucid: ' + 'ppa:silverwave/one-daily-a-month'
print 'Firefox-3.6 Karmic: ' + 'ppa:silverwave/ppa'
print 'Firefox-3.7 Karmic: ' + 'ppa:silverwave/ppa'
print
'''http://releases.ubuntu.com/releases/lucid/
ubuntu-10.04-desktop-amd64.iso
ubuntu-10.04-desktop-i386.iso
1. Copy to 'one-daily-a-month' which is the Testing PPA for Lucid.
2. TestDrive in Lucid amd64 (add ppa and install updates).
3. TestDrive in Lucid i386 (add ppa and install updates).'''
# List and Copy Lucid
if confirm(prompt='List UMD - FF3.6 *Lucid?', resp=True):
applff36 = getps('lucid','firefox')
applxu92 = getps('lucid','xulrunner-1.9.2')
print
if confirm(prompt='Copy to odam?', resp=False):
copypackage('one-daily-a-month','firefox', applff36)
copypackage('one-daily-a-month','xulrunner-1.9.2', applxu92)
else : print
if confirm(prompt='List UMD - FF3.7 *Lucid?', resp=True):
applff37 = getps('lucid','firefox-3.7')
applxu93 = getps('lucid','xulrunner-1.9.3')
print
if confirm(prompt='Copy to odam?', resp=False):
copypackage('one-daily-a-month','firefox-3.7', applff37)
copypackage('one-daily-a-month','xulrunner-1.9.3', applxu93)
else : print
'''http://releases.ubuntu.com/releases/lucid/
ubuntu-10.04-desktop-amd64.iso
ubuntu-10.04-desktop-i386.iso
1. Copy to 'ppa' which is the Testing PPA for Karmic.
2. TestDrive in Karmic amd64 (add ppa and install updates).
3. TestDrive in Karmic i386 (add ppa and install updates).'''
# List and Copy Karmic
if confirm(prompt='List UMD - FF3.6 Karmic?', resp=True):
appkff36 = getps('karmic','firefox')
appkxu92 = getps('karmic','xulrunner-1.9.2')
print
if confirm(prompt='Copy to ppa?', resp=False):
copypackage('ppa','firefox', appkff36)
copypackage('ppa','xulrunner-1.9.2', appkxu92)
else : print
if confirm(prompt='List UMD - FF3.7 Karmic?', resp=True):
appkff37 = getps('karmic','firefox-3.7')
appkxu93 = getps('karmic','xulrunner-1.9.3')
print
if confirm(prompt='Copy to ppa?', resp=False):
copypackage('ppa','firefox-3.7', appkff37)
copypackage('ppa','xulrunner-1.9.3', appkxu93)
else : print
print 'done.'
lp-getPubSo-and-Copy_odam-prod.py
#! /usr/bin/env python
#123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789
# 1 2 3 4 5 6 7 8
#silverwave OpenPGP key 03187548
#
print
print 'Connect to Service and Register Application.'
from launchpadlib.launchpad import Launchpad
lp_ = Launchpad.login_with('sapp3', 'edge')
print
print 'Check Configuration.'
this_distro = lp_.distributions["ubuntu"]
print 'Distribution: ' + this_distro.display_name
umd_achive = lp_.people['ubuntu-mozilla-daily'].archive
print 'Copy From Archive: '
print umd_achive.displayname
print
# function #0 - confirm
## {{{ http://code.activestate.com/recipes/541096/ (r1)
def confirm(prompt=None, resp=False):
"""prompts for yes or no response from the user.
Returns True for yes and False for no.
'resp' should be set to the default value
>>> confirm(prompt='Create Directory?', resp=True)
Create Directory? [y]|n:
True
>>> confirm(prompt='Create Directory?', resp=False)
Create Directory? [n]|y:
False
>>> confirm(prompt='Create Directory?', resp=False)
Create Directory? [n]|y: y
True
"""
if prompt is None:
prompt = 'Confirm'
if resp:
prompt = '%s [%s]|%s: ' % (prompt, 'y', 'n')
else:
prompt = '%s [%s]|%s: ' % (prompt, 'n', 'y')
while True:
ans = raw_input(prompt)
if not ans:
return resp
if ans not in ['y', 'Y', 'n', 'N']:
print 'please enter y or n.'
continue
if ans == 'y' or ans == 'Y':
return True
if ans == 'n' or ans == 'N':
return False
## end of http://code.activestate.com/recipes/541096/ }}}
# function #1 - getps
def getps(this_seriesname, this_source):
get_this_series = this_distro.getSeries(name_or_version = this_seriesname)
last_pubapp = umd_achive.getPublishedSources(
exact_match=True,
source_name=this_source,
distro_series=get_this_series
)[0]
result = last_pubapp.source_package_version
print result
return result
# function #2 - copypackage
def copypackage(copy_to_this_ppa,copy_this_souce,copy_this_version):
target = lp_.me.getPPAByName(name=copy_to_this_ppa)
target.syncSource(
source_name=copy_this_souce,
version=copy_this_version,
from_archive=umd_achive,
include_binaries=True,
to_series=None,
to_pocket='Release',
)
print 'Copied to: ' + target.displayname
print 'Package: ' + copy_this_souce + ' - ' + copy_this_version
print
print 'Retrieve the list of Published Packages.'
print
# Main
print 'Copy To PROD Archive:'
print 'Firefox-3.6 Lucid: ' + 'ppa:silverwave/one-daily-a-month-0'
print 'Firefox-3.7 Lucid: ' + 'ppa:silverwave/one-daily-a-month-1'
print 'Firefox-3.6 Karmic: ' + 'ppa:silverwave/one-daily-a-month-2'
print 'Firefox-3.7 Karmic: ' + 'ppa:silverwave/one-daily-a-month-3'
print
# Copy to 'one-daily-a-month-0' which is the FF3.6 PPA for Lucid.
# Copy to 'one-daily-a-month-1' which is the FF3.7 PPA for Lucid.
# List and Copy Lucid
if confirm(prompt='List UDM - FF3.6 *Lucid?', resp=True):
applff36 = getps('lucid','firefox')
applxu92 = getps('lucid','xulrunner-1.9.2')
print
if confirm(prompt='Copy to ODAM0?', resp=False):
copypackage('one-daily-a-month-0','firefox', applff36)
copypackage('one-daily-a-month-0','xulrunner-1.9.2', applxu92)
else : print
if confirm(prompt='List UDM - FF3.7 *Lucid?', resp=True):
applff37 = getps('lucid','firefox-3.7')
applxu93 = getps('lucid','xulrunner-1.9.3')
print
if confirm(prompt='Copy to ODAM1?', resp=False):
copypackage('one-daily-a-month-1','firefox-3.7', applff37)
copypackage('one-daily-a-month-1','xulrunner-1.9.3', applxu93)
else : print
# Copy to 'one-daily-a-month-2' which is the FF3.6 PPA for Karmic.
# Copy to 'one-daily-a-month-3' which is the FF3.7 PPA for Karmic.
# List and Copy Karmic
if confirm(prompt='List ODAM2 - FF3.6 Karmic?', resp=True):
appkff36 = getps('karmic','firefox')
appkxu92 = getps('karmic','xulrunner-1.9.2')
print
if confirm(prompt='Copy to ODAM2?', resp=False):
copypackage('one-daily-a-month-2','firefox', appkff36)
copypackage('one-daily-a-month-2','xulrunner-1.9.2', appkxu92)
else : print
if confirm(prompt='List ODAM3 - FF3.7 Karmic?', resp=True):
appkff37 = getps('karmic','firefox-3.7')
appkxu93 = getps('karmic','xulrunner-1.9.3')
print
if confirm(prompt='Copy to ODAM3?', resp=False):
copypackage('one-daily-a-month-3','firefox-3.7', appkff37)
copypackage('one-daily-a-month-3','xulrunner-1.9.3', appkxu93)
else : print
print 'done.'
Lucid 10.04 – All the stuff people forget to tell you – Flash, Codecs, Medibuntu, Packages, Fixes.
All the stuff you need in one place so you don’t have to go looking.
- Add Codecs and Packages.
Add Medibuntu repository.
Install favourite packages from a list.- Buttons not working on iPlayer, Flash.
Confirmed workaround.- Add PPA’s
- Light-themes: panel-background isn’t scaling.
Confirmed workaround.- Customise Theme.
Tooltips, Window Border.
______________________________
Here We Go.
Set-up:
Download: 10.04-desktop-amd64.iso or 10.04-desktop-i386.iso
- Use TestDrive to do a dry run in a vm.
- Backup (Recommended).
- Burn CD with K3b at 4 speed and check integrity.
- Check md5 sum.
md5sum ubuntu-10.04-desktop-amd64.iso >check.md5
- Get Partition Screenshots (send to Web or Gmail).
Use GParted or Systems Monitor.
- Boot the CD and hold down shift key.
Choose language. Choose test integrity. - Reboot, Choose “Try Ubuntu”.
Clean Install:
- I am performing a Clean Install not an Upgrade.
I was previously running Karmic 9.10 64bit. - My /home is on its own partition.
This enables me to keep 99% of my configuration information.
(Application Settings, Desktop, Panels, etc.) and is a huge time saver.
Installing:
- Wait for the CD files to be uncompressed and loaded.
This will take a while if you don’t have a Linux swap. - On the desktop click the short-cut “Install”.
- As you can see below the Lucid Installer is open on the left and Firefox on the right.
This allows you to consult the previously saved screenshot of your partitions.
- Double checking is a good idea at this point.
Have you set the correct file system for each partition?
That tick box marked “format”, are you sure? - Reboot when the installer is finished.
______________________________
Post Install Set-up.
If needed, install the NVIDIA, or other restricted driver, then reboot.
Add Codecs and Packages
1. Add medibuntu repository
sudo wget http://www.medibuntu.org/sources.list.d/lucid.list --output-document=/etc/apt/sources.list.d/medibuntu.list
sudo apt-get update && sudo apt-get install medibuntu-keyring && sudo apt-get update
2. Reinstall all of your favourite packages from a list.
Download the following files:
This is a list of the best/most useful packages I use.
Note that I have a 64bit system and Nvidia graphics.
You may have to adjust the list for your system.
I test it in a vm first, (via TestDrive). Details here.
3. Make the script executable.
cd /home/sil/Downloads ls chmod +x ./cleanstart-packages.list.sh
4. Run the script and install the packages.
sudo ./cleanstart-packages.list.sh
Note: Change …/sil/… to your user name.
______________________________
Buttons not working on iPlayer, Flash.
gksudo gedit /usr/lib/nspluginwrapper/i386/linux/npviewer
Add this line:
export GDK_NATIVE_WINDOWS=1
Before this line:
. /usr/lib/nspluginwrapper/noarch/npviewer
Example:
#!/bin/sh TARGET_OS=linux TARGET_ARCH=i386 export GDK_NATIVE_WINDOWS=1 . /usr/lib/nspluginwrapper/noarch/npviewer
____________________________
Add PPA Repositories.
Only add these if you want the very latest features.
Low safety, daily packages have not undergone any quality assurance.
Sometimes very safe but sometimes may not work at all.
Firefox-3.6 Lucid:
sudo add-apt-repository ppa:silverwave/one-daily-a-month-0
Firefox-3.7 Lucid:
sudo add-apt-repository ppa:silverwave/one-daily-a-month-1
sudo apt-get update sudo apt-get install firefox sudo apt-get install firefox-3.7
Or
sudo add-apt-repository ppa:ubuntu-mozilla-daily
And possibly one of these
sudo add-apt-repository ppa:chromium-daily/beta sudo add-apt-repository ppa:chromium-daily/dev sudo add-apt-repository ppa:chromium-daily/ppa
sudo apt-get update sudo apt-get install chromium-browser
____________________________
Light-themes: panel-background isn’t scaling.
Bug #532309
Confirmed workaround1:
If confident with image resizing you can just resize the panel_bg.png to whatever size you have set the panel to.
Below are examples of resizing to 32 pixels using Gwenview.
/usr/share/themes/Radiance/gtk-2.0
/usr/share/themes/Ambiance/gtk-2.0
Confirmed workaround2:
This is more involved but doesn’t require any image manipulation.
sudo gedit /usr/share/themes/Ambiance/gtk-2.0/gtkrc sudo gedit /usr/share/themes/Radiance/gtk-2.0/gtkrc
Comment out:
bg_pixmap[NORMAL] = "panel_bg.png"
e.g.
#bg_pixmap[NORMAL] = "panel_bg.png"
Set “fit”, “stretch” and “rotate” to true:
gconftool-2 --type bool --set /apps/panel/toplevels/top_panel_screen0/background/fit true
gconftool-2 --type bool --set /apps/panel/toplevels/top_panel_screen0/background/rotate true
gconftool-2 --type bool --set /apps/panel/toplevels/top_panel_screen0/background/stretch true
Right Click Panel > properties > Background Tab > Select Background image: > panel_bg.png
Log out then Log in again.
______________________________
Customise Theme.
- I now use Radiance, with the Ambiance Window Border.
Right Click on Desktop > Change Desktop Background.
Theme (Ambience) > Customise > Window Border. - Set Theme Tooltips to yellow (#F5F5B5) with black text (#000000).
Right Click on Desktop > Change Desktop Background.
Theme (Ambience) > Customise > Colour >Tooltips. - Set background to the Simple Ubuntu Purple.
______________________________
Errata:
There are a couple of packages that I need to add to the Package List for next time:
ushare – lightweight UPnP A/V Media Server (x-box)
mplayer-gui – movie player for Unix-like systems
gwenview – image viewer for KDE 4
bbe – sed-like editor for binary files
normalize-audio – adjusts the volume of files to a standard volume level
mpeg4ip-server – end-to-end system to explore streaming multimedia
Manual install needed for this:
NeroDigitalAudio.zip (Details here).
Listing latest published packages in a PPA
OK so now I have a way of listing the latest published packages in a PPA. :-)
The key is that I can specify the series e.g. lucid or karmic and get results for each.
Note: Learning python as I go… :-)
Yes a better function is called for but this will do for now.
Advantages over the web interface:
It is easy to see the 8 packages I am interested in (out of the 50 in the ppa).
I can also quickly confirm when all the packages have been built (I just check the date).
___
Code
#! /usr/bin/env python
from launchpadlib.launchpad import Launchpad
launchpad = Launchpad.login_with('bot100', 'edge')
distro = launchpad.distributions["ubuntu"]
ppa = launchpad.people['ubuntu-mozilla-daily'].archive
def getPS(seri, source):
series = distro.getSeries(name_or_version = seri)
last_app = ppa.getPublishedSources(
exact_match=True,
source_name=source,
distro_series=series
)[0]
apptemp = last_app.source_package_version
print apptemp
return apptemp
appff10 = getPS('lucid','firefox')
appff20 = getPS('lucid','firefox-3.7')
appff30 = getPS('lucid','xulrunner-1.9.2')
appff40 = getPS('lucid','xulrunner-1.9.3')
print
appff1 = getPS('karmic','firefox')
appff2 = getPS('karmic','firefox-3.7')
appff3 = getPS('karmic','xulrunner-1.9.2')
appff4 = getPS('karmic','xulrunner-1.9.3')
___
Results:
$ ./lp-getPublishedSources_one-daily-a-month.py 3.6.5~hg20100428r34143+nobinonly-0ubuntu1~umd1 3.7~a5~hg20100429r41513+nobinonly-0ubuntu1~umd1 1.9.2.5~hg20100428r34143+nobinonly-0ubuntu1~umd1 1.9.3~a5~hg20100429r41513+nobinonly-0ubuntu1~umd1 3.6.5~hg20100428r34143+nobinonly-0ubuntu1~umd1~karmic 3.7~a5~hg20100429r41513+nobinonly-0ubuntu1~umd1~karmic 1.9.2.5~hg20100428r34143+nobinonly-0ubuntu1~umd1~karmic 1.9.3~a5~hg20100429r41513+nobinonly-0ubuntu1~umd1~karmic $
___
Launchpad syncSources missing “from series”
OK a new project involving PPA’s, Launchpad, launchpadlib, Soyuz.
Lets start documenting some of this stuff while its fresh.
Tag the project “onedailyamonth” so I can find it later.
This may be a rather brutal introduction to python for me…
Oh well learning something new is always fun :-)
It works… everything else is bonus points.
Onwards…
$ python
##Start up the Launchpad command line.
>>> from launchpadlib.launchpad import Launchpad
##Start up your application and login.
launchpad = Launchpad.login_with('bot100', 'edge')
##Authorise the app in Launchpad and away you go...
Run the script or paste each command in turn to test it.
#! /usr/bin/env python
from launchpadlib.launchpad import Launchpad
launchpad = Launchpad.login_with('bot100', 'edge')
{{{
from_archive = launchpad.people['ubuntu-mozilla-daily'].archive
to_archive = launchpad.me.getPPAByName(name='one-daily-a-month')
sources_to_be_copied = ['firefox','xulrunner-1.9.2']
print to_archive.syncSources(
source_names=sources_to_be_copied,
from_archive=from_archive,
to_pocket='release',
to_series=None,include_binaries=True,
)
sources_to_be_copied = ['firefox-3.7', 'xulrunner-1.9.3']
to_archive = launchpad.me.getPPAByName(name='one-daily-a-month-1')
print to_archive.syncSources(
source_names=sources_to_be_copied,
from_archive=from_archive,
to_pocket='release',
to_series=None,
include_binaries=True,
)
}}}
___
This is great except it will not do a series, e.g. karmic, separately :-(
“API for copying packages (syncSources) needs a “from series” parameter” Bug #493914
So I will need to use syncSource instead.
This further means, that I will need a way to find the specific version name, for each of the packages.
Looking at the examples gives me something I can use…
“Listing the current package versions in a particular distroseries” here API/Examples.
OK we have a plan :-)
Note: Remuxing mkv to avi for the Xbox 360
Thanks to Zeroshade, details here.
Packages Needed:
mkvmerge, mkvextract (package mkvtoolnix), bbe, mplayer, normalize-audio, neroAacEnc, and mp4creator
Install command:
sudo apt-get update && sudo apt-get install mkvtoolnix bbe mplayer normalize-audio mpeg4ip-server
Get neroAacEnc here.
Manual Install:
unzip NeroDigitalAudio.zip cd linux sudo mv neroAacEnc /usr/bin sudo chmod +x /usr/bin/neroAacEnc
vidconv.sh here.
Example Usage:
./vidconv.sh file1.mkv
#!/bin/bash
# zeroshade's script for remuxing mkv to mp4
# http://cantthinkofa.com
VERSION="1.0"
## remuxer to remux AVC mkv videos to mp4's that can be sent to xbox 360.
# requires: mkvmerge, mkvextract (package mkvtoolnix), bbe, mplayer, normalize-audio
# neroAacEnc (http://www.nero.com/eng/downloads-nerodigital-nero-aac-codec.php)
# mp4creator (package mpeg4ip-server)
MKV=$1
if [ -z "$MKV" ]; then
echo "Usage: `basename $0` <MKV>";
exit 5
fi
# using a tmp file allows for extensibility
# if desired, the script can be extended using the audio track
# and codec by uncommenting the lines below
mkvmerge -i "$MKV" > /tmp/info.$$.txt
VID=`grep "Track ID .: video" /tmp/info.$$.txt | awk '{ print sprintf("%d",$3) }'`
#AUDINF=`grep "Track ID .: audio"`/tmp/info.$$.txt`
#AUD=`echo $AUDINF | awk '{ print sprintf("%d",$3) }'`
#AEXT=`echo $AUDINF | awk '{ print $5 }' | sed 's/(A_\|)//g' | awk '{ print tolower($1) }'`
FPS=`mplayer -identify "$MKV" -vc null -ao null -vo null -frames 0 2>/dev/null | grep ^ID_VIDEO_FPS | sed -e 's/^.*=//'`
rm /tmp/info.$$.txt
echo "------Zeroshade's remux script. MKV to mp4 V.$VERSION"
echo
if [ -z "$VID" ]; then
echo "Error getting video track from mkvmerge."
exit 5
fi
if [ -z "$FPS" ]; then
echo "Error getting framerate from mplayer"
exit 5
fi
BASE=`echo $MKV | sed 's/\.mkv//'`
echo "------Extracting video track-----------"
mkvextract tracks "$MKV" "$VID:$BASE.h264"
echo "------Changing Profile-----------------"
bbe -e "r 7 \41" --output="$BASE.tmp.h264" "$BASE.h264"
rm "$BASE.h264"
echo "------Extracting audio track-----------"
mplayer "$MKV" -novideo -vc null -vo null -ao pcm:fast:file="$BASE.wav" -channels 2
echo "------Normalizing audio----------------"
normalize-audio "$BASE.wav"
echo "------Encoding audio to m4a------------"
neroAacEnc -lc -ignorelength -q 0.50 -if "$BASE.wav" -of "$BASE.m4a"
echo "------Removing origingal audio dump----"
rm "$BASE.wav"
echo "------Converting m4a to aac"
mp4creator --extract=1 "$BASE.m4a" "$BASE.aac"
echo "------Cleaning up m4a------------------"
rm "$BASE.m4a"
echo "------Creating mp4 video---------------"
mp4creator --create="$BASE.tmp.h264" -rate=$FPS "$BASE.mp4"
echo "------Adding audio to the video--------"
mp4creator --create="$BASE.aac" -rate=$FPS "$BASE.mp4"
echo "------Removing h264 and aac------------"
rm "$BASE.tmp.h264" "$BASE.aac"
echo "------Done! Enjoy your video! =)-------"
___
*Ignore this* Working example of WordPress sourcecode: 1 1
Note: Packages to add to Install Script
nmap – The Network Mapper
ushare – lightweight UPnP A/V Media Server
nautilus-actions – nautilus extension to configure programs to launch
# Remuxing mkv to avi for the Xbox 360
# =========================
mkvtoolnix – Set of command-line tools to work with Matroska files
bbe – sed-like editor for binary files
mplayer – movie player for Unix-like systems
normalize-audio – adjusts the volume of WAV, MP3 and OGG files to a standard volume
mpeg4ip-server – end-to-end system to explore streaming multimedia
Note: cleanstart-packages.list.sh
Instructions
1. Add medibuntu repository
sudo wget http://www.medibuntu.org/sources.list.d/lucid.list --output-document=/etc/apt/sources.list.d/medibuntu.list
sudo apt-get update && sudo apt-get install medibuntu-keyring && sudo apt-get update
2. Download the the following files:
3. Make the script executable.
cd /home/sil/Downloads ls chmod +x ./cleanstart-packages.list.sh
4. Run the script and install the packages.
sudo ./cleanstart-packages.list.sh
______________________________
Alternative to 4.
A. Run the script and install the packages.
sudo ./cleanstart-packages.list.sh > clean.log
B. Monitor progress in a new terminal.
tail -f /home/sil/Downloads/clean.log
______________________________
Full details here.
A Cleanstart for your new Ubuntu (Install Packages from a list)
Clean Install
Each time Ubuntu brings out a new version I do a clean install.
I do this for a number of reasons, stability being the main one, but also to blow away all of the crud I have installed over the last 6 months.
If I don’t remember to reinstall it, then it wasn’t that important :-)
That said I do want my downtime to be as short as possible.
With that in mind I have a script (cleanstart-packages.list.sh) that reads a list of package names (packages.list) and installs them all at once.
As part of my preparation for the upcoming Lucid install, I have updated/retested the script and packages in a vm.
Quick Instructions and file downloads here.
______________________________
The code for the script is next, followed by my list of packages. Its simple but it does the job :-)
RLB (rsync local backup) – keeping it simple
Because backup should be easy…
A rsync/bash based backup solution with built-in report.
Set-up is just 3 questions… What to backup, where to save to, what to exclude… that’s it :)
SOURCE=/ DESTPATH=/backup/dr/Backups EXCLUDEFILE=/backup/dr/myscripts/rlbackup1exclude.txt
Jump to: The Code
Jump to: The Report
Jump to: The Set-up
Jump to: Background







