venerdì 29 marzo 2013

UBUNTU - remote connection using rdp protocol failure connecting to 12.04

Premise:
I use Ubuntu 12.04 with classical gnome interface ( no unity )

Question:

new install of 12.04 64 bit
 installed vnc4server and xrdp
 trying to connect remotely to it using rdp protocol
 just getting blank screen with my desktop background
 then dialog box saying /usr/bin/compiz "the application has closed unexpectently"
 what can i try to allow me to access my desktop?

answer:

In 12.04 for Gnome-Classic with no effects use:

echo "gnome-session --session=gnome-fallback" > ~/.xsession

martedì 26 marzo 2013

Riconfigurare Xorg.conf su Packard Bell EasyNote TK85

Dopo fresh install Ubuntu 12.04 e installazione bumblebee per gestire Nvidia Optimus, Xorg non piu funzionante

da Xorg.0.log

non trovava piu i driver di nulla, quindi rimetto almeno quelli intel

fem@ordinateur:~$ sudo apt-get install xserver-xorg-video-intel

e qualcosa rivà ma niente touchpad (si mouse usb) e risoluzione sballata

editare xorg.conf e portare risoluzione a 1366x768

riavviare X , ctrl-alt-F1 killandolo /usr/bin/X

ok risoluzione touchpad nada

fem@ordinateur:~$ sudo apt-get install xserver-xorg-input-synaptics

riavviare X , ctrl-alt-F1 killandolo /usr/bin/X

sembra ok e anche touchpad ok

Riconfigurare optimus ....seguire guida

http://bumblebee-project.org/install.html#Ubuntu

ovvero:

sudo add-apt-repository ppa:bumblebee/stable

sudo add-apt-repository ppa:ubuntu-x-swat/x-updates
sudo apt-get update

sudo apt-get install bumblebee bumblebee-nvidia linux-headers-generic



reboot or login

venerdì 24 agosto 2012

ANDROID - Remount Android rootfs RW via (ADB) Shell

To remount your root fs on android device as RW (read write) for any purpose without software to install on your devices, connect to your android phone via ADB or do it from internal Shell and type:

For RW roofs:

mount -o rw,remount -t rootfs rootfs /
mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system


For RO rootfs:

mount -o ro,remount -t rootfs rootfs /
mount -o ro,remount -t yaffs2 /dev/block/mtdblock3 /system


Working on Samsung Galaxy S5570 (Mini/Next) and SonyEricsson Xperia X8.

Reference:
http://chuacw.ath.cx/blogs/chuacw/archive/2011/02/25/remounting-android-rootfs.aspx

giovedì 10 maggio 2012

UBUNTU - Shell converting a list of images to one pdf

This is one example of why I love Ubuntu , and generally Linux.
I have to convert a bounch of high resolution Jpeg files to a lower resolution and I suppose to convert them to pdf and I know that via shell I can do it really quickly avoiding installing programs and dealing with complex graphical interface for doing a so simple task.

In Ubuntu (or Linux) I need ONE COMMAND in shell!!!!

This is what to do: I must have 'convert' command working

convert Man Page


File to convert are File_001.JPEG,File_002.JPEG,......File_050.JPEG





fem@rodizio:~$ convert File_0*.JPEG Single_pdf.pdf  


That's all, I have in a simple pdf 50 pages (one for every image I had) in that case, ready to print.

giovedì 15 marzo 2012

Midori Web browser - Using SOCK5 proxy server

If you need to use a ssh secure tunnel (as explained here for example)you have to set the correct proxy SOCK5 server in your browser.
Unfortunately Midori web browser lacks of this feature out of the box, but as mentioned on the official faqs we can found a workaround.

Install tsocks:


user@user-laptop:~$ sudo apt-get install tsocks


Edit the /etc/tsocks.conf file:


user@user-laptop:~$ sudo vi /etc/tsocks.conf


Edit in this way :


# Default server
# For connections that aren't to the local subnets or to 150.0.0.0/255.255.0.0
# the server at 192.168.0.1 should be used (again, hostnames could be used
# too, see note above)

server = 127.0.0.1
# Server type defaults to 4 so we need to specify it as 5 for this one
server_type = 5
# The port defaults to 1080 but I've stated it here for clarity
server_port = 1080


In this example configuration the proxy server is the localhost, the proxy server is a Sock5 and the localhost port is 1080 (you can change port number how you prefer)

Then launch midori in this way from terminal:


user@user-laptop:~$tsocks midori


Thats all

sabato 10 marzo 2012

Vim - How to set TAB key to 4 spaces

To use Vim as editor (for python in my case) is better to set the tab space to 4 spaces instead the default 8 spaces.
Its pretty simple to do.
In Ubuntu 10.10 and similar simple add this 4 lines to /etc/vim/vimrc :


Open the file..

user@box:~$ sudo vi /etc/vim/vimrc


append these lines:

"--------Setting for 4 spaces TAB key------
set smartindent
set tabstop=4
set shiftwidth=4
set expandtab
"---------End of setting -----------------


Save and restart Vim and it should work.