Sunday, December 27, 2009
Blog closed/Moved
feel free to pop in and say hello.
Cheers
Jonathon Hill
Friday, July 31, 2009
Remotely mounting network disk with ssh
The name basically says everything. This came as a i meet someone who
needed to somehow remotely mount a network disk for back ups music store
and such.
So i did some research and found out that this is easily done with the
use of sshfs so i thought even thought there are some guides already
for this why not write my own.
So here it goes.
First on the machine that has the network disk what you want to do is
to install ssh that can be done by
sudo apt-get install ssh
Now onto the client side. We need a mount point and
permission to read and write on this mount point. That could be like
this
sudo mkdir /mnt/remote
sudo chown (user) /mnt/remote
chmod og-rwx /mnt/remote
Now we need to install sshfs on the client this is simply done by
sudo apt-get install sshfs
Now we need to load the kernel info and that
sudo modprobe fuse
(note if u want this on start-up add it to /etc/modules
That was all the configuring now to connect. Here is what to do.
sudo sshfs jon@this.is.test:/mnt/sda1 /mnt/remote -o allow_other
Basically this connects to the server at 'this.is.test' with the
user name 'jon' once you enter the pass it takes the contents
of '/mnt/sda1' and puts them in /mnt/remote on your machine the '-o
allow_other' is to allow other users to read the directory.
Now if you entered that correctly it should be mounted and changes you
make in the directory will also be reflected on the server. Now to
unmount it you would enter.
sudo fusermount -u /mnt/remote
Now this is all very useful but would be a pain to have to enter in
all these commands when one wants to use the network disk so i have
wrote a small bash script.
(Disclaimer use at own risk make sure you have made
the files and that they have the right permissions on them.)
Ok for the script just put the following in a file named mountssh.sh
also be sure to change the values to suit yourself
#!/bin/sh
# Simple script for connecting to a file system on a remote host using
# Ssh
sudo sshfs jon@this.is.test:/mnt/sda1 /mnt/remote -o allow_other
echo "CONNECTING"
Then do this to the file
chmod +x mountssh.sh
Then to run the script you can either write
./mountssh.sh
Or you can just execute it normally from X
It would probably be a good idea to also make it so the disk auto mounts
whenever it is connected to the server.
Well thanks for reading that hope it helps someone out there.
Wall Paper
that's one of the important things to have. But where to get these nice
wall papers from is sometimes are hard question.
I understand that everyone has there own tastes but read on.
A site i have found recently to have wall papers of a high caliber is
http://interfacelift.com/ hey have many nice wallpapers of many
different types. My person favorite are those nice calm nature scenes.
Here is a screen of my desktop with one on it.
Thursday, July 30, 2009
Getting s/video out to work on ubuntu
someone called out in help for a way to get tv/out to work so he could
use it as a media center.
Then i remembered from back when i had a ubuntu laptop and i liked
playing games on the 46' tv that there was a easy way to do it with
xrandr. So i told him to wait about 10 minutes and i would have sorted
it for him.
So then after a bit i found it for him and here is what i told him to
do.
<disclaimer>
No i now this isn't the best way to do it but it worked for him and
worked for my with similar projects.
</disclaimer>
Firstly i told him to connect his tv to his computer. Then i told him
at the command line to type this in.
xrandr --output S-video --set load_detection 1
then
xrandr --output S-video --auto
Then after that his display on his tv popped up. He was happy. I then
saw him back in #crunchbang complaining that it wouldn't keep the
setting when he resets so again i told him to wait 10 minutes and i
would have another solution for him.
10 minutes later i did. :)
This is what i told him to do.
Firstly make a file called enabletv.sh and then put the following in it.
#!/bin/sh
xrandr --output S-video --set load_detection 1
xrandr --output S-video --auto
then i told him to save it then browse to it in the command line then
do this command
chmod +x enabletv.sh
Then i told him to then do this.
sudo cp enabletv.sh /etc/init.d
Then lastly i told him to.
sudo update-rc.d enabletv.sh defaults
Basically what i told him to do was to make a bash script which contains
the command line instructions to start the second display. Then to
simply make the script run at startup.
He greatly thanked me for this and he also said he would donate to my
fund for a better computer so i can continue to help people. If you
would like to see this donate site it can be found at
http://jonathonsfund.wordpress.com
Thanks for reading my second post! :)
My first post
Well i thought i better put some kind of welcome to the first post sorta message here so here it is.
Hi and welcome to my blog Right now you are reading the first post of my blog. I hope you stick around to read the many more that is going to be coming!
Well since thats out of the way im going to write some stuff up soon and have it read for the second post!
