Category: Linux

M d Y

Ubuntu 12.04 – Setting up Samba (3.6.3)


Hello,

Today I decided to format my Home Server and when I setuped it I had a few problems.

"Failed to Retrieve Share List from Server" when I was trying to connect to my ubuntu 12.04 server. Inside the [global] section I add:

name resolve order = bcast host

I did this in my normal computer too. (I'm not exactly sure that this is needed I don't think so). Rebooted and it is working.

Inside my logs I was getting a lot of smb_panic():

[2013/03/07 22:13:43.607536, 0] lib/util.c:1122(smb_panic) smb_panic(): calling panic action [/usr/share/samba/panic-action 1928]

(Again, I'm not sure that this is totally and exclusive related to this problem, but it worth to say, so you could try it too.)

Other message that I was seeing when trying to smbclient -L SERVER was:

NT_STATUS_PIPE_BROKEN

If you want to see my full smb.conf file keep reading!

My configs file is a Shared folder which is read only, but anyone could read it (guest yes), and the other one is Writable, where anybody can write and read (without authentication). In other words, all my setup don't uses authentications, it is all done by guests users. This is particularly good in my case, because I can put some interesting files in Shared Folder and guarantee that nobody will screw everything and the Writable is good to add new files to the server or a "temporary backup folder".

If I remember anything else, I will let you guys know.

Thanks,
Matheus

Read more »

M d Y

GEdit Tab Switcher and Closer – Plugin


I was tired to use different shortcuts on each program, so I decided to create a Plugin for GEdit to have the shortcuts that I'm used to

The shortcuts that I included:
CTRL + TAB = Change Tab
CTRL + SHIFT + TAB = Change Tab (Backwards)
CTRL + T = New Tab
CTRL + F4 = Close tab

So to have CTRL + TAB on your GEdit 2 and this others shortcuts you need to include this plugin to this path if you want to have this for all users:

/usr/lib/gedit-2/plugins/

If you want to have it just for your user paste the plugin on:

~/.gnome2/gedit/plugins/.

And if you use GEdit 3 the path to all users is:

/usr/lib/gedit/plugins/

And just for your user:

~/.local/share/gedit/plugins/

To enable GEdit - Tab Switcher and Closer, check the checkbox on:

Edit - Preferences - Plugins - GEdit Tab Switcher and Closer

Download GEdit2 - Tab Switcher and Closer
Download GEdit3 - Tab Switcher and Closer

GEdit Tab Switcher and Closer - Plugin

Enjoy
Matheus

References:
https://live.gnome.org/Gedit/PythonPluginHowTo
https://live.gnome.org/Gedit/PythonPluginHowToOld

M d Y

Add photo to key PGP/GPG using GnuPG


Good Night,

To add your picture to your PGP key using GnuPG on Linux use:

List the certificates:

gpg --list-keys

Find your and yours certificate will start with:

pub 1024D/XXXXXXXX YYYY-MM-DD

Use this command to edit your key:

gpg --edit-key XXXXXXXX

Add your picture using:

addphoto

You must use a JPG photo. The recommended size is something near 240x288. If you use big images, your certificate will be HUGE.

Add the path to your photo:

/home/user/dir/dir/photo.jpg

The system will ask for confirmation, double check it. And press Y if it is correct.
Type your password when the system ask for it.

Save the modifications

save

Send your key to a key server.

gpg --keyserver keyserver.cais.rnp.br --send-keys XXXXXXXX

That is it.

Best Regards,
Matheus

M d Y

View photos of PGP/GPG certificates using GnuPG on Ubuntu


Hello,

To visualize the photos automatically using GnuPG on Ubuntu you need to edit your config file.

Edit:

gedit .gnupg/gpg.conf

If you want to enable the exhibition on key listing look for and uncomment

# Display photo user IDs in key listings
# list-options show-photos

If you want to enable the exhibition on verification look for and uncomment

#verify-options show-photos

Add this to the config file with the photo viewer that you want to use. In this case eog

photo-viewer "eog %i"

Save the file, and enjoy.
Matheus

M d Y

Ubuntu 12.04 Beta 2


Hello,

Following the tests releases of Ubuntu 12.04, today I decided to install the last version available, the Ubuntu 12.04 beta 2, the last release before the final version. Ubuntu 12.04 release date is scheduled to April, 26 (as always, the last Thursday of April.)

To download Ubuntu 12.04 go to:
Ubuntu 12.04 Beta 2 - Download

To verify Ubuntu 12.04 release dates go to:
Ubuntu 12.04 Release Schedule

I tried the methods from Ubuntu 11.10 to go back to Gnome Classic, remove overlay scrollbar, change the menu buttons position and install the gconf-editor. Remove overlay scrollbar worked a little bit bugged, the design seems strange, but it worked. The other stuffs seems to work as normal

You can find the methods on:

Remove or disable the overlay scrollbar on Ubuntu 12.04

Change the menu buttons positions on Ubuntu 12.04

Going back to Gnome classic on Ubuntu 12.04

Best Regards,
Matheus

M d Y

Add method to VFS in Minix.


Good Night,

First of all, what is VFS? VFS means Virtual File System. It is a layer that exists in a lot of OS and in Minix too, this layer takes care of the communication with the File System. It is a Master's thesis in Computer Science from Balázs Gerófi and the name is "Design and implementation of the MINIX Virtual File system".

Read more »

M d Y

Torrent Client in linux server with web access


Hello

Why to create a server with a torrent client with web access? I live with other people that uses torrent too. I had a computer running a server with other services, so I decided to add this client (transmission-daemon) with web access, in this way we don't need to let computers on. Just this one. Everybody have web access to it and it is so simple to use.

But wich client to use? I searched a little bit and found that exists some famous ones as w3btorrent and torrentflux. but they need a web-server running like apache. And I don't want to setup it too, because I don't need it. So I choosed transmission the native torrent client in Ubuntu.

So, to install it in Ubuntu server you use:

$ sudo apt-get install transmission-daemon

Now you need to setup it, my configuration file was in /home/user/.config/transmission-daemon/settings.json

The options are a lot but it is easy to understand them.

Read more »

M d Y

How to split large file in smaller files using Linux


Hello,

To split a large file in several smaller files, you can use Split from Linux. How it works? Man split.

split --bytes=1m /path/large/file /path/output/file/prefix

You can replace the suffix of --bytes with many values as follow:
kB = 1000
K = 1024
MB = 1000 * 1000
M = 1024 * 1024
G = 1000 * 1000 * 1000
GB = 1024 * 1024 * 1024

Best Regards,
Matheus

Reference:

http://www.techiecorner.com/107/how-to-split-large-file-into-several-smaller-files-linux/

M d Y

Use Firefox 4.0 Beta in Ubuntu


Hello,

I was reading my feeds and saw that Firefox 4.0 Beta was available. I verified what happened and I discovered that Mozilla Foundation transformed the version 3.7pre6a in 4.0b1.

I used it and didn't notice any big improvement. Here a screenshot from it.

firefox-4-beta

So how to use it?
Firefox 4.0 beta - Linux 32 Bits
Firefox 4.0 beta - Linux 64 Bits
Firefox 4.0 beta - others

After the download, close your firefox. Extract. Execute the file firefox. If you want to keep using it, you can create a shortcut to it.

Matheus

M d Y

Facial Recognition using Ubuntu.


Good Night,

I was reading about Facial Recognition and found pam-face-authentication. You must have this packages to use it:
Opencv 1.0.0 +
libpam (dev version)
libX11 (dev version)
Qt4.5 (dev version)

So I decided to try it. Let's start.

Open CV - How to Install
This is a resume of what I did

1. Install the build-essential

$ sudo apt-get install build-essential

2. Access synaptic and search for "CMake", Subversion, GTK+ 2.x, libpng, zlib, libjpeg, libtiff, libjasper, python 2.3+, swig. Don't forget to install the -dev packages too

3. Install libavformat-dev

$ sudo apt-get install libavformat-dev

4. Download the opencv library

$ svn co https://opencvlibrary.svn.sourceforge.net/svnroot/opencvlibrary/tags/latest_tested_snapshot

5. Go to the download folder

$ cd latest_tested_snapshot/opencv

6. Create dir release

$ mkdir release

7. Access it

$ cd release

8. Use cmake (Don't have sure if .. is necessary.)

\
$ cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D BUILD_PYTHON_SUPPORT=ON ..

9. Make it

$ make

10. Install it

$ sudo make install

11.

$ sudo ldconfig -v

12.

$ cd bin

13. Verify if the dependencies works.

$ ./cxcoretest

Now go to Synpactic again and look for Libpam, libX11, Qt4.5 (don't forget the -dev version)

How to install pam-face-authentication? Install PAM-FaCE-AUTH (reference)

1. Download pam-face-authentication (download the last version in my time I used 0.3)

$ wget http://pam-face-authentication.googlecode.com/files/pam-face-authentication-0.3.tar.gz

2. Extract it.

$ tar -xf pam-face-authentication-0.3.tar.gz

3. Go to extracted folder

$ cd pam-face-authentication-0.3

4. Create build

$ mkdir build

5. Go to folder

$ cd build

6. (Don't have sure if .. is necessary.)

$ cmake -D CMAKE_INSTALL_DIR=/usr ..

7.

$ make

8.

$ sudo make install

Access Applications - Other - QtFacetrainer. Configure it. Go to Advanced and test it.

If you want to use it when somebody uses the "su" command. Edit "/etc/pam.d/su"

$ sudo vi /etc/pam.d/su

Add this line in the begin of the file

auth sufficient pam_face_authentication.so enableX

If you don't want a window showing the webcam remove the enableX

Matheus

Other reference