Local network access to pictures and music

Discussion in 'Linux' started by mikeatterton, Feb 19, 2009.

  1. mikeatterton

    mikeatterton

    Joined:
    Jan 14, 2009
    Messages:
    1
    Likes Received:
    0
    I've spent a lot of time over the last few weeks since I got my aspire getting familiar with Linux and what is available in software packages etc. I'm new to all this and have taken most of what follows from some invaluable entries from other contributors, so if some bits look familiar please accept my thanks and acknowledgements to those out there that are miles in front of me in know how.

    My biggest problem was to integrate the aspire with the rest of my network. Trouble is I got the wife one too. So, whatever I did had to cause the least disturbance to what she was familiar with. So, the idea of installing Ubuntu, or making things non user friendly was out of the question. The following set of changes to the Aspire were designed with minimal operator impact in mind.

    What you end up with is a set of network drives mounted as directories visible through the conventional thunar file manager, and new programs that can be started from the main menu.

    I have included the installation of VLC for music and media, gimp for photo editing and digikam (which comes with showfoto), because a little research on the web indicates these packages will meet my needs best. I am used to photoshop (inc. photoshop album) and I wanted something that best replaced them. There are some more benefits to digikam because it embeds its data in the pictures unlike photoshop album, so next time I have to swap packages there shouldn't be such a bad upheaval . If anyone knows of a utility to extract and embed photoshop data I'd be very glad of a pointer.... I have yet to explore these new programs.

    In the following text a > symbol indicates you need to type something or select something off a menu.

    Anything between the lines #-------------------------------- means you will need to cut and paste it into a file you've opened for editing.

    Everything else is commentary to explain the rest.

    If the commentary is in capitals it's the start of a subject.

    ADVANCE MENU

    This gives you access to lots more than initially provided. This isn't strictly necessary, but makes life a lot easier whilst your fiddling about.

    Bring up the file manager from the documents icon on the desktop (thunar) and open a terminal

    >file>terminal

    In the terminal window that opened type:-
    > xfce-setting-show

    In the menu that comes up :-
    >settings>settings manager>desktop>behaviour >show desktop on right click

    Now use can use right click to bring up the menu whenever you want

    NETWORK DRIVES THE EASY WAY
    Linpus uses NetworkManager which at the time of writing isn't so good at local area network connections. So using network names directly is a problem. So you will need to know the ipaddesses of computers you want to connect to. The admin page of your router (assuming you've got one) will tell you what you need to know.

    First extend mount.cifs (and umount.cifs) user privileges so that a normal user can use them, and create a directory to mount network drives in. Open a terminal as above.
    >sudo chmod u+s /sbin/mount.cifs
    >sudo chmod u+s /sbin/umount.cifs
    >sudo mkdir /mynet

    Change the directory ownership and read/write permissions

    >sudo chmod u=rwx /mynet
    >sudo chgrp user /mynet
    >sudo chown user /mynet

    In the directory /mynet make some directories that will be used to mount your network drives

    >cd /mynet
    >mkdir net1
    >mkdir net2
    >mkdir net3

    In the file fstab add the following lines (best to cut and paste). You will need to know what ipaddresses you need for your particular network, and what the shared directories are on your machines, so ip addresses and /Public and /Store will need to be replaced with your preferences. The comments (lines start with #) can say anything you want to remind you what the drive is
    In the terminal you have open already bring up an editor and edit the file fstab:-

    >sudo mousepad /etc/fstab

    In the editor cut and paste the following lines into the bottom of the file, but don't delete anything that's already there:-

    #-----------------------------------------------------------------------------------------------------------
    # Set up network drive on Office Linux machine
    //192.168.0.15/Public /mynet/net1 cifs user,suid,guest,uid=user,gid=500,_netdev,noperm 0 0
    # Set up network drive on Microsoft Office machine
    //192.168.0.9/Public /mynet/net2 cifs user,suid,guest,uid=user,gid=500,_netdev,noperm 0 0
    # Set up Freecom Drive connected to Linux machine
    //192.168.0.15/Store /mynet/net3 cifs user,suid,guest,uid=user,gid=500,_netdev,noperm 0 0
    #------------------------------------------------------------------------------------------------------------

    Now save the file and exit
    >save
    >exit

    in /mynet create the file net.sh with the following lines. The directories Linux_Server, MS_Office, and Freecom_Storage are only by example. Change them to your preference, but remember the rest of this how to will need to match what you choose:-

    In a terminal window type
    >cd /mynet
    >mousepad net.sh

    Now cut and paste, with any modifications you chose into the editor.


    #---------------------------------------------------------------------------------------------
    mount /mynet/net1
    mount /mynet/net2
    mount /mynet/net3
    ln -s -n /mynet/net1 /home/user/Linux_Server
    ln -s -n /mynet/net2 /home/user/MS_Office
    ln -s -n /mynet/net3 /home/user/Freecom_Storage
    #-----------------------------------------------------------------------------------------------

    >save
    >exit
    Check it has the right permissions
    >sudo chmod u=rwx /mynet/net.sh

    Add a new command to thunar to call net.sh. Bring up the file manager again
    >edit>configure custom actions>+

    Now enter the following
    >name Set Network
    >description Establish network connections
    >command /mynet/net.sh

    >In the Appearance Conditions tab tick the directories box


    Now click on your new icon in the file manager by right clicking and hey presto you should be able to see your network drives in each of the visible directories in the file manager.


    SETUP A NETWORK NAME FOR YOUR LAPTOP SO OTHERS CAN SEE IT
    There is an error in the /etc/rc.d/rc.5 file
    >sodu mousepad /etc/rc.d/rc.5

    Replace the following
    #-------------------------------------------------------------------------------------------------------------------
    linpus_host="`cat /etc/sysconfig/network | grep HOSTNAME | cut -d "=" -f2`"
    echo "127.0.0.1 localhost localhost
    127.0.0.1 ${linpus_host} ${linpus_host}
    " > /etc/hosts
    echo ${linpus_host} > /etc/HOSTNAME
    /bin/hostname $(cat /etc/HOSTNAME | cut -f1 -d .)
    #-------------------------------------------------------------------------------------------------------------------

    with the following

    #-------------------------------------------------------------------------------------------------------------
    linpus_fqdn_host="`cat /etc/sysconfig/network | grep HOSTNAME | cut -d "=" -f2`"
    linpus_host="`cat /etc/sysconfig/network | grep HOSTNAME | cut -d "=" -f2 | cut -f1 -d .`"
    echo "127.0.0.1 localhost localhost
    127.0.0.1 ${linpus_fqdn_host} ${linpus_host}
    " > /etc/hosts
    cat /etc/myhosts >> /etc/hosts
    echo ${linpus_fqdn_host} > /etc/HOSTNAME
    /bin/hostname $(cat /etc/HOSTNAME | cut -f1 -d .)
    #-----------------------------------------------------------------------------------------------------------------

    Create the file /etc/myhosts
    >sudo mousepad /etc/myhosts

    #---------------------------------------------------------------------------------------------------------------
    192.168.0.15 mike-desktop workgroup
    192.168.0.5 daughter workgroup
    192.168.0.17 family workgroup
    192.168.0.21 Office workgroup
    #--------------------------------------------------------------------------------------------------------------

    Now modify /etc/sysconfig/network
    >sudo mousepad /etc/sysconfig/network
    replace the contents with:-
    #---------------------------------------------------------------------------------------------------
    NETWORKING=yes
    HOSTNAME=Mike-Laptop. Workgroup
    #----------------------------------------------------------------------------------------------------

    SETUP A NETWORK SHARE
    Download system-config-samba. Open a terminal
    (You can use add/remove programs for this)

    >yum install system-config-samba
    (I also installed samba-fuze – don't know if it makes a difference)
    Now add a shared directory. From the right click drop down

    > System>Samba> + (Add share)
    >Basic tab >Directory /home/user
    >Access tab> allow access to everyone
    Set /home/user as a share and let anyone access it (read only)

    I also set up SAMBA
    >preferences>authentication user
    >guest user
    don't know if this is right but it seems to work. Setting it share allows the directory to be visible

    I THOUGHT I might need this, but it doesn't seem necessary now --------------
    Bit of a problem here with other machines wanting to see my laptop (esp. Windows Vista).

    I found it helped to set the name on my router by forcing an ip-address to the MAC address and provide the name of my laptop. Not really a problem as long as your router lets you do it. (Typically the router will give you a list of connected computers and associated ipaddresses - the laptop will probably be marked as “unknown” - not difficult to sort out, You can find the ip and mac address using the terminal:-
    >ifconfig
    This should give you the ipaddress, and related MAC address – now just check on the router to see which entry belongs to the laptop, and set a name.
    I THOUGHT I might need this, but it doesn't seem necessary now --------------

    Reboot and it should all get sorted out.


    SETUP for PICTURES

    Download gimp, and digikam normal download using right click
    >System>add/remove software
    Or....
    > sudo yum install gimp – worked, and included gutenburg print !! - will this let me print now??
    > sudo yum install digikam

    Now put gimp, digikam showphoto, and digikamthemedesigner into the startup menu as icons

    >mousepad /home/user/.config/xfce4/desktop/group-app.xml

    Add the following lines to the section in the middle of the file which starts with:-
    </group>
    <group>
    <id>7</id>
    <sequence>6</sequence>

    #------------------------------------------------------------------------------------------------------------
    <app sequence="2">/usr/share/applications/gimp.desktop</app>
    <app sequence="1">/usr/share/applications/kde/digikam.desktop</app>
    <app sequence="3">/usr/share/applications/kde/showfoto.desktop</app>
    <app sequence="9">/usr/share/applications/kde/digikamthemedesigner.desktop</app>
    #--------------------------------------------------------------------------------------------------------------

    The numbers in quotes should be unique (and may need to be different from those given above),but they will change if you modify the positions of the icons in the group (by moving the cursor over the icon holding the left mousepad key downand moving the icon to the desired position.

    I found that the icons for digikam,and showfotodidn't workto start with until I removed the options in the .desktop files as follows:-

    >sudo mousepad /usr/share/applications/kde/showfoto.desktop
    Change the line
    Exec=showfoto %i %m -caption "%c" %U
    to
    #----------------------------------------------------------------------
    Exec=showfoto
    #----------------------------------------------------------------------

    >sudo mousepad /usr/share/applications/kde/digikam.desktop
    Change the line starting with Exec to
    #-----------------------------------------------------------------------
    Exec=digikam
    #------------------------------------------------------------------------

    The same treatment for the gimp.desktop (remove the %U from the exec line) in gimp.desktop

    Now reboot

    VLC INSTALL

    Go to the VLAN site http://www.videolan.org/vlc/download-fedora.html
    And select download page
    Click on link to
    rpmfusion-free-release-stable.noarch.rpm which takes you to the following

    http://download1.rpmfusion.org/free/fed ... noarch.rpm

    The package installer will sort out the installation of this and makes the VLC package visible in the installer, but first.........to sort out some dependancy issues:-

    You need to update the fedora-release package, using a terminal(close the package installer first)
    >sudo yum update fedora-release
    Now you can use the package installer to install VLC.

    Add an icon to the panel using the same directions as above, using the linva-vlc.desktop item. I removed %U from the executable line as above for gimp etc.

    When you start VLC no sound is available. Do the following
    >settings>preferences>audio>output modules>alsa>refresh list
    This will let you pick HDA Intel ........
    And now you should have sound !!

    Happy viewing and listening.
     
    mikeatterton, Feb 19, 2009
    #1
  2. mikeatterton

    DNull

    Joined:
    Mar 31, 2009
    Messages:
    1
    Likes Received:
    0
    Just what I needed.

    Thanks!
     
    DNull, Mar 31, 2009
    #2
  3. mikeatterton

    Aspiration

    Joined:
    Mar 31, 2009
    Messages:
    220
    Likes Received:
    0
    Holy cow! That's a lot of work just to access other computers. I'd probably screw something up because using 192 ip address won't work with my airport hardware and I have no idea whether this will even work with dhcp changing addresses all the time.
     
    Aspiration, Apr 2, 2009
    #3
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.