Tuesday 8 July 2014

I had trouble with tightvnc and I found one post that helped me to set it up correctly and that it would let me copy clipboard stuff in the session

How to install tight vnc properly
How to autostart tightvnc.
Another link on how to autostart tightvnc.

About editing grup timecounter

I had a problem with my machine where grub would not select the first option even if I only had linux install.

Here is link to the post that will explain on what to edit.

How to set up samba properly so files can be moved and edited from Windows clients and local users in Ubuntu or other OS

Hello, I followed a tutorial in the official Ubuntu documentation to set up Samba and then I have realised that I can not edit or delete files when I am logged onto the server.

Therefore, I found a post that has a solution. Basically you can make folders inherit permissions and ownership from a root folder by making a group (who will access the files from clients and local logins) and include local users and an account called nobody, which allows anonymous authentication when users connect to the shared folders. Then you apply permissions and ownership to desired folder and edit samba configuration file.

Step 1 -- Editing group
There is already a group called users and you have to add your account (as well as other local ones) and nobody account to a group called 'users'.

sudo adduser <username> <group>
e.g.
sudo adduser pavel users
sudo adduser nobody users

if you add a wring user by accident, use:
sudo deluser <username> <group>
but be careful, because a mistake can delete a user permanently.

Step 2 -- Adding permissions and ownership to the folder
Now, I want /srv/samba/share to be a shared folder and to create it use:
sudo mkdir -p /srv/samba/share   #-p checks if the folder already exists.

now, perform these commands to make a group own the folder and add permissions:
sudo chown root:users /srv/samba/share
sudo chmod 2775 /srv/samba/share

Step 3 -- Configuring samba configuration file
Now, we just need to edit a file and then restart a computer.
Insert this block of text where [printers] block is located (usually at the bottom of the text file).

[public] #You can change this accordingly, it just displays the name on the network.
        comment = Shared Data
        path = /srv/samba/share #You can change this path to whatever you want. Read note though
        browseable = yes
        guest ok = yes
        force group = users
        writeable = yes
        create mask = 0664
        force directory mode = 0775




Note: don't add you home folder as a shared one, because I had trouble with it. This is because the permissions were messed up and if you put our files in there, you would not be able to edit them if you were from Windows client.

Now save the file, then log out and login or restart.

To access the folder in Windows client, type \\serveripaddress\ in address bar of window explorer.
To do that in Ubuntu's file manager, press 'Connect to server' and type smb://youripaddress/

If anything does not work for some reason it's worth to look at the original post and follow steps to make sure it works. You will find it in the reference.

Reference:

Original post.
Link about sgid bit.
Link about removing user.
Another post that kinda relates to this.

























Sunday 22 June 2014

How to set up and use secure remote control to access lubuntu computers.

Instead of writing the whole process, I would like to provide a link that helped me to figure out an easy way to set up this. Basically, it will allow you to connect to your computer across a local network or internet with secure shell and vnc viewer. (It's all done using the terminal, ut vnc clients probably have ssh feature so you do not have to enter terminal again and again.).

Here is a link.

Here is a couple of useful notes(you should read the guide first:
  • If you are using normal Ubuntu distro, it should have a vnc client called Remmina. If you enter apprpriate details as well as activate ssh tunnel (it's in ssh tab and enter relevant details there), you do not have to use terminal at all. However, if you do not activate ssh, you will still be able to connect to your desktop without secure layer. Here is a second note about the issue...
  • If you do not want to use ssh tunnel, but to connect to remote desktop without entering a password, just disable the ssh on your client and you do not have to provide password in the settings as well. However, if you want to secure the computer that you are accessing, you need to set up a password in the vino preferences (or desktop sharing, which bring it to a third note).




  •  In the guide, it will say to use 'default desktop application' (or something like that) but you wio't find it lubuntu 14.04. It's actually called 'Default applications for LXsession' and you can find it in Preferences. Once you click on it and wait till it updates its database, you will find the desktop sharing feature, which can be chosen by selecting a checkbox, by pressing on 'Autostart' button and look through a list. Remember to restart for the desktop to take effect.

Tuesday 17 June 2014

How to set up a static IP address on Ubuntu Desktop Edition.

Note: This tutorial applies to desktop version of Ubuntu (in this case I am showing example in lubuntu, but other variants should work as well). If you develop a ubuntu server, I refer you to Ubuntu Server documentation to set static IP address.

Hello guys, after wasting an hour to find a way to set the static IP address in my machine, I figured out the cause of the problem. If you've read 'Setting up static address' in ubuntu server documentation, you know that you can do that by writing stuff to a file. However, it will not work in Desktop Edition of Ubuntu, because there is an application called 'network-manager' that keeps the same configurations and prevents the written configurations to be applied for static addressing.

So, in order to set a static IP address, you need to enter your details into that program. Usually, you will find it in settings and it's (usually) named Network Connections.

 


After finding the application, you should be able to see a list of ethernet interfaces (including wifi) and double-click on appropriate one or select one and press 'Edit'.

 



Once you've done that, you will see property tabs. Click on 'IPv4 Settings'

 


You should see a drop down list next to 'Method:' and select 'Manual'. Then you will notice that you will be able to add an address to the list. Enter appropriate settings. Remember that Gateway is a point where you can access the internet (e.g router) and Netmask is the one that usually facemask of IP addresses. Usually it looks like 255.255.255.0, but you have to check it yourself. Furthermore, DNS server is usually the same as Gateway address if you have a home router.



Once information is entered, save it and restart the computer. Now your computer should have the static IP address.

Note: Since I showed this example in Lubuntu, you should be able to find the same or similar settings on different variants of ubuntu.