четвъртък, 14 април 2011 г.

How to share files and folders in Ubuntu

How to share files and folders in Ubuntu

Linux This brief tutorial will outline how to enable file sharing in Ubuntu.
  1. Sharing files and folders across your network from your Ubuntu PC is every bit as easy as sharing files in Windows (arguably, it’s easier). Start by right-clicking the folder you want to share, and select Share Folder. If the services required to share files/folders aren’t installed, you’ll be prompted to install them.
  2. After clicking Install services they will automatically start to download and install.
  3. Once that has completed you’ll be presented with an options window. From here you can select the type of sharing (SMB or NFS), give the shared folder a name and decide if you want read-only access to the folder. Click OK when you’re done.
  4. If you right-click on your newly shared folder and select Properties and then the Emblems tab, you can give the folder a unique icon so you’ll know it’s shared.
  5. click to enlarge
  6. You can further modify the permissions of your shared folder by selecting the Permissions tab.
  7. click to enlarge
  8. Now open a terminal in Ubuntu and enter the command:
    sudo smbpasswd -a username
    This will add a SMB user.
  9. And now other computers can connect to your shared folder!

How to stop KDEwallet from asking you for a wireless password at login

I've always hated to effectively login TWICE just so's I can connect to my encrypted wireless network at home.

It means I can't leave my browser open when I shutdown, as when the desktop restarts along with my browser, it can't access the network until I've authenticated with the default wallet.

BUT I've found a way around that particular problem

What you need to is :

- bring up the KDE Wallet Configuration window (right click on the wallet icon in the systray)

- enable the Different wallet for local passwords option and create a new wallet for local passwords (kdeconfig1)

- Then click on the access control tab and delete any networkmanager entries from the list (walletconfig2) and click ok

- Then you need to left click on the wallet icon in systray to bring up the wallet manager

- click your default wallet (ie not the one you just created for locals) to view the password folders

- Then right on the network management folder and select the delete folder option

...

- Log out and back in again and when your desktop starts, network manager will ask you to open your wallet for local passwords at which time you'll click on the 'allow always' button and thereafter ... voila! you will be automatically connected to your wireless network. (at least it worked for me)




The password of the newly created Wallet should be left blank!!!

NB: You still need to enter a password to access the other encrypted passwords in your default wallet, but at least you don't have to worry about network access.

Hope this helps.

Cheers

неделя, 10 април 2011 г.

Enable Suspend and Hibernate via keyboard shortcuts in KDE 4.6/ Kubuntu

The commands are

dbus-send --print-reply --dest='org.freedesktop.PowerManagement' /org/freedesktop/PowerManagement org.freedesktop.PowerManagement.Suspend 

for SUSPEND

dbus-send --print-reply --dest='org.freedesktop.PowerManagement' /org/freedesktop/PowerManagement org.freedesktop.PowerManagement.Hibernate

for HIBERNATE

I assign these commands to keyboard shordcuts  - Shortcut and Gestures>Custom Shortcuts>Edit>New>Global Shortcut>Command/Url :)

петък, 8 април 2011 г.

How to wake up your Ubuntu/Kubuntu/Xbuntu Maverick from USB port

This is a "how-to" , describing how to enable USB wake up from suspend/sleep on a Ubuntu 10.10 system. It worked for me on Lucid 10.04 with Maverick and Natty kernels applied.
I got and old Thinkpad x40 laptop, which I use for a multimedia machine with Xubuntu 10.04 and XBMC installed. I tried this method on Kubuntu 10.10, so I suppose it should be working on Ubuntu, too.
So , first lets find out the id of the device which will be used for waking up the system - in my case, a Logitech USB mouse(Everything published in Courier are terminal commands)

lsusb 

This is the terminal output:


Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 002: ID 046d:c521 Logitech, Inc. Cordless Mouse Receiver
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub




So, the ID of the device is:
c521

Second command(change the device ID with yours):
grep c521 /sys/bus/usb/devices/*/idProduct

Here is the output:



/sys/bus/usb/devices/3-1/idProduct:c521

You should get the number after the devices/, in my case 3-1. This should be used later.

Now, run this

cat /proc/acpi/wakeup

This will populate all methods from waking your PC from sleep and hibernate, and if it is enabled or not. My list is

Device S-state Status Sysfs node
LID S3 *enabled
SLPB S3 *enabled
PCI0 S3 *disabled no-bus:pci0000:00
PCI1 S4 *disabled pci:0000:00:1e.0
DOCK S4 *disabled
USB0 S3 *disabled pci:0000:00:1d.0
USB1 S3 *disabled pci:0000:00:1d.1
USB2 S3 *disabled pci:0000:00:1d.2
AC9M S4 *disabled pci:0000:00:1f.6


I know I have to use USB0 in my case. I dont know a way to tell which USB port uses my mouse in the moment, besides the trial and error method. It is disabled at  the moment. Or, you can enable all.

sudo -s  (enter password when prompted)
echo "USB0" > /proc/acpi/wakeup
echo enabled > /sys/bus/usb/devices/3-1/power/wakeup

Then run

cat /proc/acpi/wakeup


to verify the port is enabled. You can try this now.

If something goes wrong, try creating /etc/rc.d/local.
look here:
http://forums.whirlpool.net.au/archive/1376177

Lets make this run on startup


sudo gedit /etc/rc.local

and paste at the end of the file:


echo "USB0" > /proc/acpi/wakeup

echo enabled > /sys/bus/usb/devices/3-1/power/wakeup

That should do it :)