Archive for the ‘Tech’ Category
Mount network shares at boot. (Ubuntu)
Monday, March 10th, 2008If, like me you have your media and web server kept on another machine, and get annoyed having to put your username and password in each time you want to grab a file or listen to music, then this is for you.
This is the most secure method I could come up with, simply put, if your main machine is not logged on as you, then the shares cannot be accessed without the username and password. When you are logged on these details will be called from a file that is owned by the root user.
This tutorial will assume you have samba already installed on your media/web server. Without it, this will not work.
The following must be done on the SERVER machine
- sudo gedit /etc/samba/smb.conf
I am using GEDIT here to make it easier for you to amend the file. I much prefer PICO, or you may wish to use VI, if your balls are bigger than King Kongs.
Make the following changes:
- workgroup = “WORKGROUP”
Note: The name of the workgroup (in quotes) must be the same on your windows and/or your Ubuntu box. If you do not know the name or your workgroup, look under “My Network Places” on your windows box, select “Microsoft Windows Network” and you will see a list of your workgroups. Default workgroup on windows XP, home edition is MSHOME (not WORKGROUP).
underneath it, add
- netbios name = name_of_your_server (no spaces)
For example
- netbios name = my_new_smb_server
Make sure the “security” option is set to “user” before moving on.
Scroll down to the bottom of the file and add the following lines:
- [Name_of_folder]
- path = /path/to/file
- browseable = yes
- writable = yes
- read only = no
- guest ok = no
- create mask = 0644
- directory mask = 0755
- force user = root
- force group = root
Do not forget to change the name of the folder and the path to the folder. The name you give this folder will appear in the network folder on your Ubuntu box. ie. Music or Vids etc. and the PATH will be something like this path = /home/user/Music. You will get the jist of it.
Save the changes and close the file.
Restart the samba daemon
- sudo /etc/init.d/samba restart
The following must be done on YOUR computer
Open a terminal session and type the following commands one by one, allowing each of them to finish before executing the next one.
- sudo apt-get install samba
- sudo apt-get install smbfs
Now that you have the core files installed we need to do some configuration.
All folders that you wish to have mounted go into a root level folder called /media. This is much nicer than previous and other version of linux where it was called /mnt. now most will know this means MOUNT but some may not. Anyway, lets get on with it.
Lets make that new directory. If you decided to call your share name “Music” in the part above, you would do this:
- sudo mkdir /media/Music
Obviously, you name it how you want it. for example, I have many shares such as /media/Vids, /media/Music, /media/WWW etc etc.
Now type the following command
- gksudo gedit /root/.smbcredentials
This will create a hidden file called .smbcredentials in your root folder. We will store your username and password in this file for ease of access later on
Insert the following lines into the file: (substituting “yourusername” and “yourpassword” for your ubuntu machine login details)
- username=yourusername
- password=yourpassword
Save and exit the file and issue these commands one by one:
- sudo chmod 700 /root/.smbcredentials
- sudo cp /etc/fstab /etc/fstab_backup
- gksudo gedit /etc/fstab
Now you should be presented with another file. In here we will make the mods that mount those folders on boot up so you don’t have to touch them again. Put the following line at the bottom of the file, making the changes to the location of your server machine. for example, mine is at 192.168.1.125 so I would do this
- //path_to_server/folder_name /media/folder_name smbfs credentials=/root/.smbcredentials,dmask=777,fmask=777 0 0
Once you have added all your mount points and changed the names to correspnd with your details., save and exit the file.
Now issue this final command:
- sudo mount -a
Your new mount points will appear as drive locations on your Desktop and in the Places menu
Citrix ICA Client install on Ubuntu (Feisty and Gutsy)
Monday, March 10th, 2008Citrix is a system that allows you to run applications you have at work/home from anywhere in the world or on your local area network (LAN) from a remote workstation.
You have real time access to run your applications as fast as if you are in the office. It does not matter if you’re using a dialup modem, DSL, ISDN, or T1 to access citrix remotely. Connection speeds become even less of an issue with high speed broadband connections pretty much the norm around the world now.
Citrix was built for virtualisation in mind, and obvioulsy owing to the fact that Microsoft is pretty much everywhere these days the main applications are easy to install on a windows machine, I am not going to cover that in the slightest.
To install Citrix ICA presentation client on your Ubuntu PC then follow the steps below.
Open a Terminal session
The three links below are using the new AptURL command which is installed by default on Ubuntu Gutsy and allows people like myself and any other tutorial writer to make it easier for you to install the packages you need. Just click the link and it will install the package for you. If this does not work, type the following command into the terminal window.
- sudo apt-get install apturl
Now that is out of the way, continue on.
- Click here to install libxaw6
- Click here to install libmotif3
- Click here to install alien (used to convert RPM to DEB packages)
You will now need to download the RPM file from Citrix. NOTE: It is version 10.6 (at time of writing) and is the second download icon (again, at time of writing). As the file names will change with new releases you will need to modify the tutorial to reflect this. You can however just grab the file from me.
Grab the file from here. I believe it is version 10.0 which is slightly out of date but works solidly so I recommend using it.
- http://www.citrix.com/site/SS/downloads/details.asp?dID=2755&downloadID=3323#top
Save the file to your desktop (this tutorial assumes you save it to your desktop, if not please change commands accordingly)
In your terminal window you now need to change to the directory where you saved the file, then we will begin converting and installing.
- cd Desktop
Now that you are on the desktop we now need to convert the file into a .Deb package that Ubuntu can handle.
- sudo alien ICAClient-10.0-2.i386.rpm
Once the file is converted we now need to install it.
- sudo dpkg -i icaclient_10.0-3_i386.deb
Now need to make this work through Firefox web-browser. We will create some symbolic links for Firefox so that it knows how to open the Citrix application file when you attempt to login.
- sudo ln -s /usr/lib/ICAClient/npica.so /usr/lib/mozilla/plugins/npica.so
- sudo ln -s /usr/lib/ICAClient/npica.so /usr/lib/mozilla-firefox/plugins/npica.so
Restart Firefox
Navigate to your Citrix server and login. Click on the application you want to launch. If it asks you to save/open with you will need to choose “open with” and navigate to the following folder:
- /usr/lib/ICAClient
and choose to open with the following application.
- wfica
You should now be good to go.
Edit
I am aware that some people get Font errors with the Citrix Client, it is safe to ignore but if you wish to fix them you can drop me a line in the comments and I will write up the fix.
mod_rewrite on Apache(2) Server
Monday, March 10th, 2008Mod_Rewrite uses a rule-based rewriting engine (based on a regular-expression parser) to rewrite requested URLs on the fly. It supports an unlimited number of rules and an unlimited number of attached rule conditions for each rule to provide a really flexible and powerful URL manipulation mechanism. The URL manipulations can depend on various tests, for instance server variables, environment variables, HTTP headers, time stamps and even external database lookups in various formats can be used to achieve a really granular URL matching.
In most Apache servers the mod_rewrite module is not activated by default. If you wish to have your URL’s changed on the fly and rewritten into nice, human readable format then you will need to enable this module. Follow the steps below to enable mod_rewrite.
Open a Terminal window and type:
- sudo a2enmod
You will be presented with the following, but you can safely ignore what is in front of you and just follow the next steps.
- Which module would you like to enable?
- Your choices are: actions alias asis auth_basic auth_digest authn_alias authn_anon authn_dbd authn_dbm authn_default authn_file authnz_ldap authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cern_meta cgid cgi charset_lite dav_fs dav dav_lock dbd deflate dir disk_cache dump_io env expires ext_filter file_cache filter headers ident imagemap include info ldap log_forensic mem_cache mime mime_magic mod_python negotiation php5 proxy_ajp proxy_balancer proxy_connect proxy_ftp proxy_http proxy rewrite setenvif speling ssl status suexec unique_id userdir usertrack version vhost_alias
- Module name?
Enter the module name “rewrite” and press enter. Now you need to open the default file with sudo rights and change the “AllowOverride” option from “None” to “All” in the first 2
- sudo pico /etc/apache2/sites-enabled/000-default
Below is what it should look like when you are finished.
<VirtualHost*>- ServerAdmin root@xpheas.com
- DocumentRoot /var/www
<Directory/>- Options FollowSymLinks
- AllowOverride All
</Directory><Directory /var/www>- Options Indexes FollowSymLinks MultiViews
- AllowOverride All
- Order allow,deny
- allow from all
</Directory>
Restart the webserver.
- sudo
/etc/init.d/apache2 force-reload
Now the module is enabled, all that is left is to rewrite your .htaccess for URL changing.
Now that you have mod_rewrite enabled you are going to want to use it. In my next tutorial I will show you how to rewrite your .htaccess file to change ugly URLS into nice URLS. An exmaple of each is below so you can understand what I mean.
Ugly URL
- http://example.com/blog/?p=17
Nice URL, which of course is more search engine friendly and will provide much better SEO.
- http://example.com/blog/index.php/2007/09/17/dont-tase-me-bro/
Multi-TouchScreen Computing
Thursday, June 7th, 2007Jeff Han and Phil Davidson over at Perceptive Pixel have created the future in technology and company in industry and hopefully in the home. This technology is called Multi-Touchscreen Computing.
Perceptive Pixel, Inc. was founded by Jeff Han in 2006 as a spinoff of the NYU Courant Institute of Mathematical Sciences to develop and market the most advanced multi-touch system in the world.
The uses for this are endless. Boardrooms, hospitals, military, home cinema. I could go on, but I shall leave it to your imagination.
For more info and to watch the video, please take a visit to Perceptive Pixel where Jeff Han and Phil Davidson will demonstrate how a multi-touch computer screen will change the way we work (and play).
Install Lexmark Printers (Ubuntu)
Thursday, September 28th, 2006This tutorial will guide you through installing Lexmark printers on Ubuntu. The tutorial was taken from the Ubuntu forums. I decided to post it here as it did not work exactly like it was supposed to for me and I had to modify the procedure.
I have ammended the tutorial to my needs and probably the needs of most and I have pointed out where it went wrong for me and how I solved it. It was not difficult to solve, but you will be required to be the ROOT user which is dangerous and destructive. Use at your own risk, I take NO responsibility for you damaging your system.
You will of course need to download the correct drivers for this, the Z600 driver. I have the correct link for the file as Lexmarks website is not the easiest to navigate around and find what you need.
The Z600 driver has been confirmed to work with the following printers:
Lexmark 5700 (black & white only)
Lexmark X1100
Lexmark X1110
Lexmark X1130
Lexmark X1140
Lexmark X1150
Lexmark X1180
Lexmark X1185
Lexmark Z513
Lexmark Z515
Lexmark Z715
Lexmark Z55
Lexmark Z615
Lexmark Z705
Lexmark Z605
Lexmark Z600
Lexmark Z25
Dell A920
Z65 (z65 driver)
Lexmark Z33 (z35 driver)
Lexmark Z33 (z35 driver)
First of all you need to download the correct driver to a folder of it’s own to save confusion.
Open a terminal window and type the following
sudo mkdir lexmark
This will create a folder called “lexmark” in your home directory.
Ok, again in your terminal window, type the following commands one after another, waiting for each command to execute first before starting the next one.
cd lexmark
wget http://www.downloaddelivery.com/srfilecache/CJLZ600LE-CUPS-1.0-1.TAR.gz
tar -xvzf CJLZ600LE-CUPS-1.0-1.TAR.gz
tail -n +143 z600cups-1.0-1.gz.sh > install.tar.gz
tar -xvzf install.tar.gz
sudo apt-get install alien
alien -t z600cups-1.0-1.i386.rpm
alien -t z600llpddk-2.0-1.i386.rpm
sudo tar xvzf z600llpddk-2.0.tgz -C /
sudo tar xvzf z600cups-1.0.tgz -C /
sudo ldconfig
cd /usr/share/cups/model
sudo gunzip Lexmark-Z600-lxz600cj-cups.ppd.gz
The driver is now installed. Restart the cups daemon:
sudo /etc/rc2.d/S19cupsys restart
Check to make sure the printer back-end works:
cd /usr/lib/cups/backend
./z600
The output of the above command should be similar to this:
direct z600:/dev/usb/lp0 “Lexmark Lexmark Z600 Series” “Lexmark Printer”
If you get no output, mount the usb filesystem. To do this type the following:
sudo gedit /etc/fstab
and add the following code to the end of the file
#USB Lexmark Printer
usbfs /proc/bus/usb usbfs devgid=14,devmode=0660 0 0
Save the file and close. Then just type the following in the terminal:
sudo mount usbfs
That should fix it.
Now simply set up your printer. Go to:
- System
- Administration
- Printing
Make sure you select the z600 driver, and you’re done. Print out a test page to make sure it all works.
I hope this has helped you.
Search
Previous Posts
- Ubuntu Install Screenshots Posted by Soddengecko February 7, 2010
- HOW TO: Move Ubuntu Home folder to another drive Posted by Soddengecko February 7, 2010
- HOW TO: Random password generator on Ubuntu and other Linux systems Posted by Soddengecko February 7, 2010
- HOW TO: Perform system backup in Ubuntu – Part 2 – Restore Posted by Soddengecko February 7, 2010
- HOW TO: Perform system backup in Ubuntu – Part 1 – Backup Posted by Soddengecko February 7, 2010
- SBS 2003: Mapping network drives for users at logon Posted by Soddengecko February 7, 2010
- Sharepoint Services not configured for use with ASP.NET 2.xxxxx Posted by Soddengecko November 26, 2009
- Customising Firefox 3 Posted by Soddengecko May 13, 2008
- How to: Install Ubuntu packages with HTML link Posted by Soddengecko March 15, 2008
- How to: Increase ext3 and reiserfs performance Posted by Soddengecko March 11, 2008
Recently Updated
Archives
People
Linkies
- Matthew Moore This blog belongs to an associate of mine. He likes to jibber jabber on a bit, and he has decided to document his exercising habits lately, but look back and check out some of the good stuff. Added on March 22nd, 2008 @ 12:08
- Fight for Kisses Probably the best shaving advert I have seen. Not much by the way of pretentious bullshit and it actually has a couple of funny moments. Worth a watch. Added on October 25th, 2007 @ 09:52
- Speedtest.net Speedtest.net is a broadband connection analysis tool with a huge selection of geographically dispersed testing servers. Ookla provides this service free to hundreds of thousands of people every day. If you are experiencing slowness with your Internet connection or are simply interested in testing your speed, Speedtest.net is for you. Added on October 15th, 2007 @ 22:09
- Sadikhov Forums A forum of like minded people helping others achieve the coveted CCNA qualification. The site is aimed at helping those understand the complex issues presented in the exams and making sure you understand them before wasting your money. Added on October 15th, 2007 @ 22:09
- RouterSim.com RouterSim has been the leader in IT simulation training since 1999. RouterSim’s Industry expert Todd Lammle offers you the best learning tools available. We have expanded our offerings to match your budget and needs. RouterSim offers simulators, computer-based training videos, online CCNA simulation testing, and exam preparation software. Added on October 15th, 2007 @ 22:08
- Generic Linux rules of thumb for security The only secure box is turned off and locked in the back room — but it’s also not much use to anyone Added on October 15th, 2007 @ 22:06




by @ 20:42