Bubble-Bytes

Just another WordPress site, for now..

[Fedora 16] Sharing files with your Windows computers

If you, like myself, are running multiple computers on your network, one or more running Fedora, and you like to share files across the network between computers then this guide is for you. I have encountered multiple problems when doing this between Linux and Windows, this guide will show you how to overcome them.

There are 5 main steps:

  1. Installing Samba
  2. Configuring your shared folders
  3. Adding users to the access
  4. Starting the service on boot
  5. Configuring your Firewall

1. Installing Samba

To install Samba on to your computer go ahead and open up Terminal on your Fedora computer and enter the following:
 sudo yum install samba samba-client
Here you will, of course, be prompted to enter your password so do so and press ‘y’ to confirm you would like to install the packages.

2. Configuring your shared folders

Okay, so you’ve installed Samba, that was easy! Next you’ll have to configure what folders you would like to share on the network. To do this, again open up Terminal and run the following:
 sudo gedit /etc/samba/smb.conf
This will open gedit (text editor), here scroll down to the [global] section and add the name of your Workgroup (by default it’s WORKGROUP, but this can be changed). Once you’ve changed that you’ll have to scroll down even further, right to the bottom of the file and add some shared folders, like so:

[lawrence]                  #the name of your share
path = /home/lawrence       #the path to your share
public = yes                #whether or not the file is public
writable = yes              #if the user can write to the folder or not

When you’re happy with the settings go ahead and save the file, then close it.

3. Adding users to the access

To be able to access the file you will have to log in to the computer from your windows computer. To do this you’ll need a username and password, type the following into Terminal:
 sudo smbpasswd -a Lawrence
Replace Lawrence with your Fedora username. Then choose a password, this does not need to be the same as your Fedora password, it can be anything.

4. Starting the service on boot

Now, finally, you’ll most likely want Samba to start every time you boot so you can access your files all the time. This is very easy to do, all you need to type is:
 sudo systemctl enable smb.service nmb.service
This will start the Samba service every time Fedora boots.

5. Configuring your Firewall

Next you’ll need to open up your Firewall configuration. This can be done by going to Activities and typing Firewall, here you’ll be prompted for your password, enter it and proceed to allow Samba through your firewall, by ticking the box next to it.

Apply the changes and reboot, you should now be able to access your files from your Windows PC using:
 \\fedoracomputernamehere
In my case it would be:
 \\lawrence-pc

That’s it, done! Please leave a comment if you need further help.

[Fedora 16] Custom login themes using KDM

In the following tutorial, I will explain how to install your own login theme, instead of using the default Fedora display.

Steps:

  1. Installation
  2. Switching Display Managers
  3. Downloading a new theme
  4. Installing the theme
  5. Finished!

Let’s get started..

1. Installation

To follow this tutorial, there is one package you’ll have to install (KDM) and another which is preferred (system-switch-displaymanager).

KDM

Install KDM first, use the following command to do so:
 sudo yum install kdm
Obviously enter the password, and hit ‘y’ when it asks you whether or not you’d like to install the dependencies, or this won’t work.

system-switch-displaymanager

This part is optional, but recommended for ease of installation!
To install this, simply enter the following into Terminal:
 sudo yum install system-switch-displaymanager
Press ‘y’ once more to install this and once that has installed, you’re done with all the package installation!

2. Switching Display Managers

Now, to switch display managers is relatively easy if you installed system-switch-displaymanager, but if you didn’t you may encounter problems, leave a comment if you do.

Using system-switch-displaymanager

This is very easy, all you need to do is firstly open up a new instance of Terminal and type in the following:
 system-switch-displaymanager kde
You’ll be prompted for your password, and when entered your display manager will be changed to KDM, you may log out to see the results if you wish at this point.

Using Terminal or gedit

What you’ll need to do in this step is add DISPLAYMANAGER=”KDE” to /etc/sysconfig/desktop, to do this, you can either use a Terminal command, or open up the file in gedit.

Purely Terminal method

Run the following in terminal:
 su -
That will log you into root, be careful when doing this, as you could mess up your system if you’re not.
After logging into root, execute this:
 echo 'DISPLAYMANAGER="KDE"' > /etc/sysconfig/desktop
This should now have created the file /etc/sysconfig/desktop and added the line DISPLAYMANAGER=”KDE” to it. To check that this is the case I do recommend following the gedit method also.

Terminal and gedit method

This method is very simple also, firstly, open up the file using a super user instance of gedit (the file cannot be edited without being the superuser):
 sudo gedit /etc/sysconfig/desktop
Then all you will need to do is add DISPLAYMANAGER=”KDE” to the file and save it, done! If it’s already there, then just close the file and move onto the next step.

3. Downloading a new theme

This part is pretty self explanatory, but for your benefit, I’ll give you a brief guide on how to do this..!

Firstly, you’ll need to find one, obviously! A great place to look is on kde-look.org, this website has an absolutely vast amount of themes for all sorts of things! However, for this guide, you’ll have to only look under the category KDM Themes.
For this guide, I’ll be downloading and installing Helium One, so download the theme of your choice and place it in a memorable place.

4. Installing the theme

Okay, so you’ve downloaded the theme, next you’ll want to install it, go ahead and open up KDE System Settings, this will open the following screen:

KDE System Settings

Scroll right to the bottom and open up the Login Screen button. This will bring you to the settings where you can change how the Login Screen functions. What you’ll want to do here, is open up the Theme tab and press Install new theme. You should then be able to navigate to the theme file and install it, in this step it will ask you for the root password, enter it and it should successfully install the theme for you.

KDM System Settings

Once this has been installed, select it, instead of the default Verne theme, hit Apply, enter your password and it should now be changed!

5. Finished!

There, that’s it! All there is for you to do now is restart and admire your brand new login screen!

I hope you found this useful!

[Apple Keyboard] Change the function key behaviour in Linux

When I first installed Linux while using my Apple Keyboard, one of my earliest frustrations was the function keys (fn), it’d force me to press the fn key to access the F series of keys, which I did not enjoy! After a little bit of digging around the internet, I found this handy trick, which let you change the fn behaviour:
echo 2 > /sys/module/hid_apple/parameters/fnmode

If you execute that as root, the fn behaviour will change as desired, however, if it outputs that the file does not exist, try the following instead:
echo 2 > /sys/module/hid/parameters/fnmode

Once you have carried out this action, add the line which worked to your /etc/rc.local file and reboot. This file will load at each boot, and make the change permanent.

There you have it, now whenever you want to change into fullscreen mode, or just use any F key, you should no longer have to press the function key!