Ubuntu Linux

Guides and useful links
User avatar
DaveG
Rising from the depths
Rising from the depths
Posts: 498
Joined: 11 May 2008
Contact:

Re: Ubuntu Linux

Postby DaveG » 22 May 2009, 15:26

I've made some progress with gaming.

My problems with Steam running was that locations to click on seemed to be slightly vertically misaligned, and because of this, I couldn't reduce the window size, as it was touching both of my GNOME panels. However, by hiding the gnome panels, I was able to resize the window, and it's behaved properly ever since.

Also, I have got TF2 running at just about a bearable framerate by running it in a 1024x768 window. I achieved this by simply turning off all desktop effects. (System -> Preferences -> Appearance : None). Caveat; if you are regularly using the Compiz manager, make sure you export your settings, and then import them back when you re-enable desktop effects.

This is all by just using WINE, I could pay Cedega, but I'm not really feeling prepared to shell out money yet, although it's definitely an option I'm considering.

I haven't been too impressed with the native Linux shooters I've tried so far, I've tried Open Arena and Alien ... something or other so far. I'm going to check out Urban Terror 4 when I get a chance, I could try America's Army, but that it's ran by the US military kind of creeps me out, plus I played on Windows and it wasn't really fun. Having said that though, the ordinary little Linux games that are in the Ubuntu repositories are good fun, especially "Moon Lander".
Visit my blog & follow me on Twitter
Image
User avatar
DaveG
Rising from the depths
Rising from the depths
Posts: 498
Joined: 11 May 2008
Contact:

Re: Ubuntu Linux

Postby DaveG » 22 May 2009, 15:27

I've also got some sweet rsync scripts written for all of my removable drives. They're all using "zenity" to give me a system tray notification that they're actually running.

And, since we're talking about Linux stuff here, I'd be happy to share the code with anyone who's interested. 8-)
Visit my blog & follow me on Twitter
Image
kingosticks
Rising from the depths
Rising from the depths
Posts: 368
Joined: 09 May 2008

Re: Ubuntu Linux

Postby kingosticks » 23 May 2009, 14:40

DaveG wrote:I've also got some sweet rsync scripts written for all of my removable drives. They're all using "zenity" to give me a system tray notification that they're actually running.

And, since we're talking about Linux stuff here, I'd be happy to share the code with anyone who's interested. 8-)


I'd be interested in that, just yesterday I spent ages trying various backup programs for my project work (im terrified of losing it just before the deadline). I settled for sbackup in the end as I only really wanted to copy my local svn repository to my uni user account over ssh, and that was made very simple with sbackup. I was looking for a way to also backup to my portable hdd but for this to only happen when the drive was plugged in. So that maybe plugging it in would trigger the backup script? Any ideas?

The best bits of linux/ubuntu I've found so far are:
Hellanzb (and hellafox firefox extension) - easily the best software for using newsgroups and nzb files on any OS.
Swiftweasel - architecture specific optimised firefox binaries, I'm convinced that it starts faster than regular firefox.
Guake - A very handy and customisable drop-down terminal
Gnome-blog - A web blogging applet for your panel which you can gradually add to and then post to a handful of blogging services (blogger, livejournal etc).
User avatar
DaveG
Rising from the depths
Rising from the depths
Posts: 498
Joined: 11 May 2008
Contact:

Re: Ubuntu Linux

Postby DaveG » 23 May 2009, 15:15

Okay,
I have three scripts I've written, one for my phone memory card, one for my main backup proceedure, and one for my digital camera memory card. They're all .sh files in my documents folder, but I launch them from custom application launchers on my GNOME Panel.

Here's the script I've written for synchronising my phone's memory card. It does a number of things:
  • Displays a system tray notification to indicate that it is running (I launch it from a panel icon in GNOME).
  • Mirrors my Podcasts (downloaded on laptop by Miro).
  • Mirrors my MP3 collection.
  • Adds any photos I've taken on my phone to my photo archive on my laptop (without mirroring).
  • Mirrors documents:
    • I keep a folder on my laptop of my phone's documents, which is mirrored onto my phone's memory card. Although, some things in that folder, like E-Books, are simply links to files elsewhere. So rsync has to be told to copy the files and not the links to my memory card.
    • It also examines a folder on the memory card called "localfiles", where I put any new files, created on my phone, which is then sent to the documents folder on the hard drive.
    • It also examines a folder on the memory card called "localtrash", which is how I indicate on my phone that I want a file to be removed from both locations.

Code: Select all

#!/bin/bash

trap cleanup EXIT
function cleanup()
{
   [ ! -z "$PID" ] && kill -9 $PID &>/dev/null
}
zenity --notification --window-icon=/home/david/Pictures/icons/hardware/e51.png --text "Phone Sync Running"&

PID=$!
PWD=$(pwd)

cd /home/david/Videos/Syndicated/
find -depth -type d -empty -exec rmdir {} \;

echo =================
echo Updating Podcasts
echo =================

rsync -avh --delete --prune-empty-dirs --progress --size-only --exclude=*.lnk --exclude=*.part --exclude=*720p.mp4 --exclude=Thumbs.db --exclude=Incomplete\ Downloads/ --exclude=PixelPerfect--HD-Quicktime-/ --exclude=Tekzilla--HD-Quicktime-/ --exclude=Systm--HD-Quicktime-/ --exclude=Hak5--Large-Xvid-/ --exclude=Tekzilla--Large-Xvid-/ --exclude=Smartphones-Show--VGA-/ --exclude=JPL/ --exclude=Jupiter-Broadcasting-Videos/ --exclude=TED-Talks/ --log-file=/home/david/Videos/.logs/podlog.txt /home/david/Videos/Syndicated/  /media/Drg16gmsd/Videos/Podcasts/

echo ========================
echo Updating Video Downloads
echo ========================

rsync -avh --delete --prune-empty-dirs --progress --size-only  --exclude=Not_For_Sync/ --log-file=/home/david/Videos/.logs/dllog.txt /home/david/Videos/_Downloaded/ /media/Drg16gmsd/Videos/Downloads/

echo ==============
echo Updating Music
echo ==============

rsync -avh --delete --prune-empty-dirs --progress --size-only  --log-file=/home/david/Videos/.logs/musiclog.txt /home/david/Music/ /media/Drg16gmsd/Music/

echo ==================
echo Syncing Phone Docs
echo ==================

cd /home/david/

dir1=/media/Drg16gmsd/Documents/localtrash/
dir2=/home/david/Documents/E51/
find $dir1 -type f | sort | sed "s:$dir1::g" > tmp.dir1.txt
find $dir2 -type f | sort | sed "s:$dir2::g" > tmp.dir2.txt
comm -1 -2 tmp.dir1.txt tmp.dir2.txt > tmp.common.txt
while read file
do
rm -f "$dir1/$file"
rm -f "$dir2/$file"
done < tmp.common.txt
rm tmp.dir1.txt tmp.dir2.txt tmp.common.txt

rsync -avh --remove-source-files /media/Drg16gmsd/Documents/localfiles/ /home/david/Documents/E51/
rsync -avh --copy-links --delete /home/david/Documents/E51/ /media/Drg16gmsd/Documents/
mkdir /media/Drg16gmsd/Documents/localfiles/
mkdir /media/Drg16gmsd/Documents/localtrash/

echo ======================
echo Uploading Phone Photos
echo ======================

rsync -avh --exclude=*.zip --exclude=*.ZIP /media/Drg16gmsd/Images/ /home/david/Pictures/_Photos/Main\ Archive/E51/

cd $PWD


Now, this script is my primary back up script. I back up everything from my laptop (documents, photos, music, videos) onto my 64GB thumb drive. This one is much simpler than the previous one. It does the same Zenity notification icon, but the main difference is that it mounts a truecrypt volume as my back ups are all encrypted.

Code: Select all

#!/bin/bash

trap cleanup EXIT
function cleanup()
{
   [ ! -z "$PID" ] && kill -9 $PID &>/dev/null
}
zenity --notification --window-icon=/home/david/Pictures/icons/hardware/corsair64gb.png --text "Back Up Running"&

PID=$!

echo .
echo ===============
echo Mounting Volume
echo ===============
echo .

truecrypt /media/DRG64GB/data /media/truecrypt1
rm /media/truecrypt1/*.txt

echo .
echo ====================
echo Backing up Documents
echo ====================
echo .

rsync -avh --delete --prune-empty-dirs --progress --log-file=/media/truecrypt1/docs.linux.txt --exclude=Thumbs.db --exclude=Mozilla/Firefox.default/ --exclude=Mozilla/Songbird.default/ /home/david/Documents/ /media/truecrypt1/Documents/

echo .
echo ==================
echo Backing up Archive
echo ==================
echo .

rsync -avh --delete --prune-empty-dirs --progress --log-file=/media/truecrypt1/archive.linux.txt --exclude=Thumbs.db /home/david/_Archive/ /media/truecrypt1/Archive/

echo .
echo ================
echo Backing up Music
echo ================
echo .

rsync -avh --delete --prune-empty-dirs --progress --log-file=/media/truecrypt1/music.linux.txt /home/david/Music/ /media/truecrypt1/Music/

echo .
echo =================
echo Backing up Videos
echo =================
echo .

rsync -avh --delete --prune-empty-dirs --progress --log-file=/media/truecrypt1/video.linux.txt --exclude=_Downloaded --exclude=Syndicated /home/david/Videos/ /media/truecrypt1/Videos/

echo .
echo ===============
echo Backing up home
echo ===============
echo .

sudo rsync -avh --delete --prune-empty-dirs --progress --exclude=_Archive --exclude=Desktop --exclude=Documents --exclude=Music --exclude=Pictures --exclude=Videos --exclude=.wine --exclude=.Truecrypt --exclude=jungledisk --exclude=.Truecrypt --exclude=.local/share/Trash --exclude=.gvfs --log-file=/media/truecrypt1/home.linux.txt /home/david/ /media/truecrypt1/home



echo .
echo ===========
echo Dismounting
echo ===========
echo .

truecrypt -d


The last script is the most simple of all, it simple looks at the memory card from my digital camera, and scrapes all the images into my photo archive, and wipes the card in the process. This one uses Zenity as well.

Code: Select all

#!/bin/bash

trap cleanup EXIT
function cleanup()
{
   [ ! -z "$PID" ] && kill -9 $PID &>/dev/null
}
zenity --notification --window-icon=/home/david/Pictures/icons/hardware/CanonA510.png --text "Photo Get Running"&

PID=$!

rsync -avh --remove-source-files /media/DRGMSD2G/DCIM/ /home/david/Pictures/_Photos/Main\ Archive/Canon\ A510/DCIM/
Last edited by DaveG on 06 Jun 2009, 17:17, edited 1 time in total.
Visit my blog & follow me on Twitter
Image
User avatar
Dr Who
Rising from the depths
Rising from the depths
Posts: 200
Joined: 22 May 2008

Re: Ubuntu Linux

Postby Dr Who » 06 Jun 2009, 08:37

Arrrrggghhhhhh - Ubuntu drives me nuts.

I have installed 6.04, 7.10 and now 9.04 on multiple laptops and EVERY time the wireless has been a frickin nightmare. The most recent attempt hit a brick wall because I simply could not get the Broadcom card in my laptop to scan for networks, or connect to my router even when filling in all the details. After two days of effort the wireless icon started spinning but it just would not connect.

Gave up and switched to Mandriva. Same problem initially but all I needed to do was press Fn + F2 to toggle the wireless (and all the standard shortcuts work in Mandriva, which they didn't in Ubuntu) and I am now wireless. W00t. Its possible the problem was the same under Ubuntu but I couldn't figure out how to turn the wireless radio on and off, which was very simple in Mandriva. Might have found my new favourite linux distro.
User avatar
DaveG
Rising from the depths
Rising from the depths
Posts: 498
Joined: 11 May 2008
Contact:

Re: Ubuntu Linux

Postby DaveG » 06 Jun 2009, 11:50

Really glad to hear you've got something that works for you.

I hear lots of problems with Broadcom WiFi, not sure why. I'm fortunate in that my laptop is a Centrino system, so the WiFi is Intel which is open source friendly.
Visit my blog & follow me on Twitter
Image
User avatar
Advocate
Master of the Salmon Slap
Master of the Salmon Slap
Posts: 2115
Joined: 08 May 2008
Location: London
Contact:

Re: Ubuntu Linux

Postby Advocate » 06 Jun 2009, 12:05

Ive had many issues with broadcom - ndiswrapper has always sorted them though....

Personally not a fan of Mandriva but as long sa you like it thats what counts :)
User avatar
Johnmcl7
Daemonhunter
Daemonhunter
Posts: 7999
Joined: 07 May 2008
Location: Inverness
Contact:

Re: Ubuntu Linux

Postby Johnmcl7 » 06 Jun 2009, 12:33

I've also had problems with Broadcom network cards which seem to be poorly supported under Linux which given they make a lot of network cards particularly in business machines it's surprising that they don't have better Linux support.

John
Used correctly terrain is a second weapon in your arsenal, equal to your Titan itself. Make the battlefield work for you, or you will find it working for your opponent.
kingosticks
Rising from the depths
Rising from the depths
Posts: 368
Joined: 09 May 2008

Re: Ubuntu Linux

Postby kingosticks » 06 Jun 2009, 16:56

I think I had a similar problem with Ubuntu at first and it was because my Wireless card was disabled or something similar to what you describe. It might have been just a case pf right-clicking on the wireless icon and clicking "enable wireless" or it might have been the keyboard shortcuts, i cant remember now other than it being painfully easy in the end.
User avatar
Dr Who
Rising from the depths
Rising from the depths
Posts: 200
Joined: 22 May 2008

Re: Ubuntu Linux

Postby Dr Who » 07 Jun 2009, 11:00

I suspect you may be right, but the keyboard shortcut didn't exist and wasn't available in the standard list of commands. Could have found a script for it but by that time I had ploughed something like 4-6 hours into making the wireless connection work and it was easier to download and install a new distro!

Mandriva is an interesting one. If you had a complete novice coming from a Windows background I think its great - very familiar setup, with a hardware manager, add/remove programs, the 'One' download version contains a lot of drivers and it autodetects hardware (my Huawei 220 USB 3G broadband stick just worked, as did my printer). So quite plug and play. In fact I wasted a lot of time assuming that I would need to install these via Google/Terminal until I realised it was actually much easier than that! However, multimedia was much harder, unless you want to pay for their Powerpack. They seem committed to open source but not to anything that has been reverse engineered, like quite a few codecs.. You can get round this using the Penguin Liberation Front repositries. I prefer the ethos of Ubuntu but I like the ease of use of Mandriva.
kingosticks
Rising from the depths
Rising from the depths
Posts: 368
Joined: 09 May 2008

Re: Ubuntu Linux

Postby kingosticks » 25 Jun 2009, 18:01

Ive come across a major issue that I cannot find a solution for. It appears that the nvidia linux drivers do not have support for decoding HD video. Running .mkv files on my Ubuntu install gives mostly just watchable performance and at time awful performance where I dont see anything for up to 30 seconds at a time. I think the CPU in my Peg 670 is around 2Ghz and I can hear it going like the clappers but it appears to be not enough. Is this just my machine being rubbish? I need to test the same video on windows 7 but I think the drivers for that enable the gfx to help out the cpu.
kingosticks
Rising from the depths
Rising from the depths
Posts: 368
Joined: 09 May 2008

Re: Ubuntu Linux

Postby kingosticks » 26 Jun 2009, 12:24

OK, the film was choppy in Windows 7 also. Maybe not quite a bad but still totally unwatchable in places. I guess its more of a general lack of gpu acceleration for mkv files rather than specific to ubuntu/linux. i really want a new computer.
User avatar
DaveG
Rising from the depths
Rising from the depths
Posts: 498
Joined: 11 May 2008
Contact:

Re: Ubuntu Linux

Postby DaveG » 26 Jun 2009, 12:34

kingosticks wrote:OK, the film was choppy in Windows 7 also. Maybe not quite a bad but still totally unwatchable in places. I guess its more of a general lack of gpu acceleration for mkv files rather than specific to ubuntu/linux. i really want a new computer.

Thanks for updating on this on, I did Google around for you, but didn't find anything too useful, so didn't respond.

What I was looking in relation to GPU support was the commercial codec package you can buy for Linux, "Fluendo".
Visit my blog & follow me on Twitter
Image
kingosticks
Rising from the depths
Rising from the depths
Posts: 368
Joined: 09 May 2008

Re: Ubuntu Linux

Postby kingosticks » 26 Jun 2009, 14:08

cheers for trying Dave, I will have a look into that. Paying for the codec to watch the film I downloaded for free is a brilliant situation!
User avatar
Johnmcl7
Daemonhunter
Daemonhunter
Posts: 7999
Joined: 07 May 2008
Location: Inverness
Contact:

Re: Ubuntu Linux

Postby Johnmcl7 » 26 Jun 2009, 17:40

What resolution are the videos?
Used correctly terrain is a second weapon in your arsenal, equal to your Titan itself. Make the battlefield work for you, or you will find it working for your opponent.

Return to “Useful Info”

Who is online

Users browsing this forum: No registered users and 1 guest