2015/04/06

MTP-Media Transfer Protocol in Pisi Linux

MTP-Media Transfer Protocol

MTP or the Media Transfer Protocol, is a USB device class which is used by many mobile phones (e.g. Samsung Galaxy S4) and media players (e.g. Creative Zen).

Linux MTP support is provided by libmtp which can be installed with libmtp from the Pisi Linux Repositories. It can be installed on its own and used to access devices. However, a number of packages are available that use it as a dependency and add additional convenience (e.g. filemanager) functionalities and compatibility with particular device types - which includes improving transfer access speeds.

Integration with file manager

  • To view the contents of your Android device's storage via MTP in your file manager, install the corresponding plugin:
  • For file managers that use GVFS (GNOME Files, Xfce's Thunar), install gvfs-mtp for MTP or gvfs-gphoto2 for PTP support.
  • For file managers that use KIO (KDE's Dolphin), install kio-mtp (PTP support is included by default).

  • After installing the required package, the device should show up in the file manager automatically and be accessible via an URL, for example mtp://[usb:002,013]/.

Usage

It might be required to create a mount-point directory first. The directory ~/mnt is used as an example below. Also do not forget to unlock your phone's screen before connecting it to the computer.

libmtp

Detect your device:

# mtp-detect

Note: Your regular user must be in the uucp group.

Connect to your device:

# mtp-connect

If connection is successful, there are several switch options to use in conjunction with mtp-connect to access data on the device. You might want to use some stand alone commands:

  • mtp-albumart mtp-emptyfolders mtp-getplaylist mtp-reset mtp-trexist 
  • mtp-albums mtp-files mtp-hotplug mtp-sendfile mtp-connect mtp-folders 
  • mtp-newfolder mtp-sendtr mtp-delfile mtp-format mtp-newplaylist mtp-thumb
  •  mtp-detect mtp-getfile mtp-playlists mtp-tracks
Warning: Some commands may be harmful to your MTP device!


Media players


You can also use your MTP device in music players such as Amarok. To achieve this, you might have to edit /etc/udev/rules.d/51-android.rules (the MTP device used in the following example is a Galaxy Nexus). Run:

$ lsusb

Search for your device. It should be something like that:

Bus 003 Device 011: ID 04e8:6860 Samsung Electronics Co., Ltd GT-I9100 Phone [Galaxy S II], GT-P7500 [Galaxy Tab 10.1]

And entry to /etc/udev/rules.d/51-android.rules will be this:

SUBSYSTEM=="usb", ATTR{idVendor}=="04e8", ATTR{idProduct}=="6860", MODE="0666", OWNER="[username]"

Also reload udev rules:

# sudo udevadm control --reload

Troubleshooting

libmtp

If you see a message like:

Device 0 (VID=XXXX and PID=XXXX) is UNKNOWN. Please report this VID/PID and the device model to the libmtp development team

You should check whether your device is listed in the Supported devices list. If it is not, you should report it to the developers team. If it is, your libmtp might be slightly outdated. To allow it to be properly used by libmtp, you can add your device to:


/etc/udev/rules.d/69-libmtp.rules

gvfs-mtp

If you have installed the gvfs-mtp package, and your device doesn't show up in the file manager, you might need to reboot or write a udev rule in order to auto-mount the device.

Plug your device and get the vendor-id and product-id,respectively:

$ lsusb Bus 001 Device 007: ID 0421:0661 Nokia Mobile Phones Lumia 920 (...)

The two numbers after ID are vendorId : productID

Then make a udev rule, e.g.

# nano /etc/udev/rules.d/51-android.rules

Note You need Admin Rights to write it

and type this rule:

ATTR{idVendor}=="YOUR VENDOR ID HERE", ATTR{idProduct}=="YOUR PRODUCT ID HERE", SYMLINK+="libmtp", MODE="660", ENV{ID_MTP_DEVICE}="1"

Reload the udev rules.

# udevadm control --reload

And reboot the system. Now file managers (like Thunar) should be able to automount the MTP Device.

kio-mtp

If you are not able to use the action "Open with File Manager", you may work around this problem by editing the file /usr/share/apps/solid/actions/solid_mtp.desktop.

Change the line

Exec=kioclient exec mtp:udi=%i/

To

Exec=dolphin "mtp:/"


Source: Wiki Archlinux
Note: All the commands here work in Pisi Linux.



2015/03/28

Cleaning Software in Pisi Linux

Cleaning Software

You have ask you some Days how can i clean my Pisi Linux System?
All work with a Computer leaves traces, if only it is garbage data.

Here any Tips how you can clean up your Pisi Linux System.

We have in Pisi Linux three Cleaning Tools, 2 with Graphical UI and one can you use in the command line.

The 2 with Graphical UI are Bleachbit and Sweeper and the one with using from commandline is fslint.

At the first of  all can you cleaning your Pisi Package Manager Cache with a simple Command:

sudo pisi dc 

or 

sudo pisi delete-cache



You see on the Image here that it cleans the Package Manager from unnecessary Files, or better when you have install a lot Software or you have installed a lot of Updates.

Note: When you have run this command takes the Package Manager a Moment to load again when you use it.

Bleachbit

You must install it in Pisi Linux with the Package Manager or command line with

sudo pisi it bleachbit

BleachBit quickly frees disk space and tirelessly guards your privacy. Free cache, delete cookies, clear Internet history, shred temporary files, delete logs, and discard junk you didn't know was there. Designed for Linux and Windows systems, it wipes clean a thousand applications including Firefox, Internet Explorer, Adobe Flash, Google Chrome, Opera, Safari,and more. Beyond simply deleting files, BleachBit includes advanced features such as shredding files to prevent recovery, wiping free disk space to hide traces of files deleted by other applications, and vacuuming Firefox to make it faster. Better than free, BleachBit is open source.

Select the type of data you want to remove in BleachBit’s sidebar after launching it. Unlike CCleaner, BleachBit doesn’t automatically select or recommend certain types of data to delete. BleachBit works with system-wide data as well as application-specific data – for example, for web browsers such as Firefox.



BleachBit warns you if you select an option that’s slow or may have other problems.



You should run a preview by clicking the Preview button before running an actual Clean operation. Verify that Bleachbit isn’t deleting any important files you want to keep.


Note: Bleachbit can not clean the Pisi Linux Package Manager, and set not a hook or delete the localizations it can crash your Pisi Linux System.

you can open Bleachbit as Root with ALT-F2 for the krunner and type in

kdesu bleachbit

And open Bleachbit not as Root when you not know what are you doing

Sweeper

You must install it in Pisi Linux with the Package Manger or command line with

sudo pisi it sweeper

Sweeper helps to clean unwanted traces the user leaves on the system and to regain disk space removing unused temporary files.
  • It can remove web-related traces: cookies, history, cache
  • It can remove the image thumbnails cache
  • It can also clean the applications and documentes history

Sweeper deletes the cached data used by KDE applications from the KDE cache folder. To see the location of this folder enter kde4-config --path cache in Konsole. Cleaning up your cached data withSweeper makes it only impossible to read them e.g. using a filemanager, but it is possible to read the raw data, which is still on the disk, using a low level disk tool.


Note: Do not clean the temporary files in a running session you can not login to your Session it breaks
to clean the Temporary Directory  go to the console with  Ctrl + Alt + F1.  root by typing the root password and give in:

rm -rf / tmp / *

after when it is clean type exit and  you can switch to the graphical Display with Ctrl + Alt + F7 .

fslint

you must install it in Pisi Linux with the Package Manager or command line with

sudo pisi it fslint

FSlint is a utility to find and clean various forms of lint on a filesystem.
I.E. unwanted or problematic cruft in your files or file names.
For example, one form of lint it finds is duplicate files.
It has both GUI and command line modes.


A complete Introducing for fslint found you here:


Each Time be carefully when you use this, one hook or click to much can crashed your System.
The best way is make a Backup from your System.




2015/03/18

14 commands to check hardware information in Pisi LInux

14 commands to check Hardware Information

For a while i have post here Information about Hardware and System Information in three Parts.

Part 1: Hardware and Systeminformation from Commandline in Pisi Linux Part1 the lshw command

Part 2: Hardware and Systeminformation from Commandline in Pisi Linux Part 2 the dmidecode

Part 3: Hardware and Systeminformation from Commandline in Pisi Linux Part 3 inxi

Now here have you a little overview about a lot of more commands, this commands works for the most Linux Distributions ( such as Debian based or other).
You become here the commands with a little Image for Pisi Linux so that you can see it works, and Pisi Linux give you Hardware Information such as the most Linux Distributions.

1. lscpu
The lscpu command reports information about the cpu and processing units. It does not have any further options or functionality.



2. lshw - List Hardware

A general purpose utility, that reports detailed and brief information about multiple different hardware units such as cpu, memory, disk, usb controllers, network adapters etc. Lshw extracts the information from different /proc files.



Read the following Page to learn more about the lshw command:

3.lspci - List PCI

The lspci command lists out all the pci buses and details about the devices connected to them.
The vga adapter, graphics card, network adapter, usb ports, sata controllers, etc all fall under this category.


Filter out specific device information with grep.

$ lspci -v | grep "VGA" -A 12




4. lsscsi - List scsi devices

Lists out the scsi/sata devices like hard drives and optical drives.

Note for this command you must install in Pisi Linux the package lsscsi, simple with the command:

$ sudo pisi it lsscsi



5. lsusb - List usb buses and device details

This command shows the USB controllers and details about devices connected to them. By default brief information is printed. Use the verbose option "-v" to print detailed information about each usb port


On the above Image you can see, 1 usb port is being used by the mouse, and one i using by the Keyboard

.6. Inxi

Inxi is a 10K line mega bash script that fetches hardware details from multiple different sources and commands on the system, and generates a beautiful looking report that non technical users can read easily.

$ inxi -Fx




For more inxi commands can you read this page:


7. lsblk - List block devices

List out information all block devices, which are the hard drive partitions and other storage devices like optical drives and flash drives


8. df - disk space of file systems

Reports various partitions, their mount points and the used and available space on each.



9. fdisk

Fdisk is a utility to modify partitions on hard drives, and can be used to list out the partition information as well.



10. mount

The mount is used to mount/unmount and view mounted file systems.


And again, use grep to filter out only those file systems that you want to see

$ mount | column -t | grep ext



11. free - Check RAM

Check the amount of used, free and total amount of RAM on system with the free command.




12. dmidecode

The dmidecode command is different from all other commands. It extracts hardware information by reading data from the SMBOIS data structures (also called DMI tables).


display information about the processor/cpu
$ sudo dmidecode -t processor 
# memory/ram information 
$ sudo dmidecode -t memory 
# bios details 
$ sudo dmidecode -t bios




13. /proc files



Many of the virtual files in the /proc directory contain information about hardware and configurations. Here are some of them

CPU/Memory information


# cpu information
$ cat /proc/cpuinfo 
# memory information 
$ cat /proc/meminfo



Linux/kernel information





SCSI/Sata devices



Partitions





14. hdparm

The hdparm command gets information about sata devices like hard disks.






Each of the command has a slightly different method of extracting information, and you may need to try more than one of them, while looking for specific hardware details. However they are available across most linux distros, and can be easily installed from the default repositories.

On the desktop there are gui tools, for those who do not want to memorise and type commands. Hardinfo, I-nex are some of the popular ones that provide detailed information about multiple different hardware components.