Showing posts with label linux. Show all posts
Showing posts with label linux. Show all posts
Thursday, December 29, 2016
How to get your lost Linux OS after Installing a Windows crap
How to get your lost Linux OS after Installing a Windows crap
Requirement: An Ubuntu Linux Live CD / USB. In this case you can make do with anything that has GRUB-INSTALL package with the Live CD. But if you have access to the internet using that Live session then you can just Google things down and dont even need this post, right?
Method:
1. Launch the Live Session.
2. Bring up terminal and type: sudo su
this gives you the privilege of a root in the live session
3. Now type: fdisk -l
Lists up all the partitions present in your system. Look for the partition that has "Linux" in the rightmost column. Note its /dev/sdx name from the left most column.
4. Type : mount /dev/sdx /mnt
Here /dev/sdx is the partition name that you noted. This command mounts that partition in mnt
5. Now type: grub-install --root-directory=/mnt/ /dev/sdx
Here /dev/sdx is the same thing as the previous command. Look at the output, the last line should say that the Installation went successful. VIOLA!!!
Reboot your system from your hard drive (normally) and hopefully the OSs should be there listed beautifully by GRUB. Smile!!!! Dont have to miss your favorite Linux distro.
Method:
1. Launch the Live Session.
2. Bring up terminal and type: sudo su
this gives you the privilege of a root in the live session
3. Now type: fdisk -l
Lists up all the partitions present in your system. Look for the partition that has "Linux" in the rightmost column. Note its /dev/sdx name from the left most column.
4. Type : mount /dev/sdx /mnt
Here /dev/sdx is the partition name that you noted. This command mounts that partition in mnt
5. Now type: grub-install --root-directory=/mnt/ /dev/sdx
Here /dev/sdx is the same thing as the previous command. Look at the output, the last line should say that the Installation went successful. VIOLA!!!
Reboot your system from your hard drive (normally) and hopefully the OSs should be there listed beautifully by GRUB. Smile!!!! Dont have to miss your favorite Linux distro.
Go to link download
Wednesday, December 21, 2016
Running Counter Strike Source on Linux native version
Running Counter Strike Source on Linux native version
CAUTION: Try this only if you face any problem running the game(s).
Well, its great news that companies are now releasing Linux version of many games including Valve. Theyve already made Portal, Half Life and Counter Strike: Source available on Linux. But running them is sometimes a bit tricky mainly when CPU architectures mismatch. I have a 64bit setup while the copy I was trying to run was 32 bit so some libraries were reported to be missing when what it actually meant was, the 32 bit versions were missing. A little bit of research goes a long way.
1. First execute this command in you Counter Strike: Source installation directory (cd into it)
2. To give you an idea about exactly what is going to happen with the next command, these are the libraries that are need to be installed
1. https://bbs.archlinux.org/viewtopic.php?id=169422
2. Torrent page on The Pirate Bay
Well, its great news that companies are now releasing Linux version of many games including Valve. Theyve already made Portal, Half Life and Counter Strike: Source available on Linux. But running them is sometimes a bit tricky mainly when CPU architectures mismatch. I have a 64bit setup while the copy I was trying to run was 32 bit so some libraries were reported to be missing when what it actually meant was, the 32 bit versions were missing. A little bit of research goes a long way.
1. First execute this command in you Counter Strike: Source installation directory (cd into it)
This should tell you exactly which libraries are missing
LD_LIBRARY_PATH=bin ldd bin/vguimatsurface.so | grep found
2. To give you an idea about exactly what is going to happen with the next command, these are the libraries that are need to be installed
So, to install them, type these in your terminal
lib32-fontconfig lib32-gtk2 lib32-libxi lib32-nss lib32-libpng12 lib32-alsa-lib lib32-pango lib32-cairo lib32-sdl2
References:
libfontconfig1:i386
libgtk2.0-0:i386
libnss3:i386
1. https://bbs.archlinux.org/viewtopic.php?id=169422
2. Torrent page on The Pirate Bay
Go to link download
Saturday, December 17, 2016
Mount non Linux drives automatically when they are not in etc fstab
Mount non Linux drives automatically when they are not in etc fstab
So, I usually face this problem when Im not using GUI based File Managers. They allow you to auto mount drives when you click on them but when you are using CLI based file managers or no file managers at all, the only way is to mount them through writing commands. Im a lazy fad and I want this done automatically. So heres a script for that. [ https://gist.github.com/Tafhim/5d0839caca813ae82c97 ].
#!/usr/bin/zsh
if [[ "$1" == "" ]] then
echo "Please specify a device name";
exit;
fi;
deviceFile=$1
## Auto mount only ntfs, fat32, vfat
for i in $(ls $deviceFile* | grep [0-9]$); do
blkid -s UUID -o value $i | read z;
blkid -s TYPE -o value $i | read f;
echo "$z is $f";
if [[ "$z" != "" && ("$f" == "ntfs" || "$f" == "vfat" || "$f" == "fat32" ) ]] then
/usr/bin/udisksctl mount -t $f -b $i # https://help.ubuntu.com/community/AutomaticallyMountPartitions
fi;
done
Go to link download
Tuesday, December 13, 2016
Ubuntu Linux Installing a program and making it accessible through CLI and Unity
Ubuntu Linux Installing a program and making it accessible through CLI and Unity
So, today, I wanted to install a famous text editor called "Sublime Text 2" in my Ubuntu installation. I downloaded the tar file provided by them. Like many programs, I found no installer package or program but just the executables. Yes it was usable but I wanted more. I wanted to call the program with its name not always navigate to the directory where I downloaded it just to use it. So I found this tutorial here and made it accessible via both Unity Dash and CLI (Terminal). I realized I often fall into this kind of problem when Im using Ubuntu / Linux in general. So, I decided to write down the things I have to know when Im doing such a thing.
First of all, you need to move your executables folder to the /usr/lib directory. Suppose youre too installing Sublime Text. You extract it via the tar tool like this.
First of all, you need to move your executables folder to the /usr/lib directory. Suppose youre too installing Sublime Text. You extract it via the tar tool like this.
tar xf Sublime Text 2 Build 2181 x64.tar.bz2Then you get the folder "Sublime Text 2". You move it to the /usr/lib directory using this command.
sudo mv Sublime Text 2 /usr/lib/Now you create a Symbolic Link, more like a Command to call the application via command line interface (CLI) using this
sudo ln -s /usr/lib/Sublime Text 2/sublime_text /usr/bin/sublimeNow create a launcher (icon you search for using HUD)
sudo sublime /usr/share/applications/sublime.desktopEdit that .desktop file (specify what it does) and configure it to run Sublime Text when its clicked on, paste all this in it, you can even spend time trying to understand it (for future applications)
[Desktop Entry]Thats it, now you can run the program using terminal (without pointing to where its stored) and click on a launcher to run it. :)
Version=1.0
Name=Sublime Text 2
# Only KDE 4 seems to use GenericName, so we reuse the KDE strings.
# From Ubuntus language-pack-kde-XX-base packages, version 9.04-20090413.
GenericName=Text Editor
Exec=sublime #The symbolic link
Terminal=false #Dont run it using terminal
Icon=/usr/lib/Sublime Text 2/Icon/48x48/sublime_text.png #Which icon to use
Type=Application #Type type type :P
Categories=TextEditor;IDE;Development #More info
X-Ayatana-Desktop-Shortcuts=NewWindow
[NewWindow Shortcut Group]
Name=New Window
Exec=sublime -n
TargetEnvironment=Unity
Go to link download
Wednesday, December 7, 2016
Linux Mint FIrefox hanging up repeatedly for seconds weird Google search page
Linux Mint FIrefox hanging up repeatedly for seconds weird Google search page
Im using Linux Mint Lisa (12) with GNOME 3 for a couple of months now. Im impressed with the huge user support community and nice interface with the ease of using the same knowledge I had from Ubuntu. Recently the Firefox installation got somehow crapped up. It showed weird search results.

Moreover, the pages would repeatedly hang up. They would get updated (downloaded) but wont change until there was some cursor movement. It was real irritating. Thanks to "remoulder" from Linux Mint Forums, I found a nice method for repairing these things.
Close down Firefox > Press Alt + F2 > type "firefox -profilemanager" without the quotes
Youll see a default profile there. That profile is corrupted. Just create a new one using the options and start with the new one. All fixed.

Moreover, the pages would repeatedly hang up. They would get updated (downloaded) but wont change until there was some cursor movement. It was real irritating. Thanks to "remoulder" from Linux Mint Forums, I found a nice method for repairing these things.
Close down Firefox > Press Alt + F2 > type "firefox -profilemanager" without the quotes
Youll see a default profile there. That profile is corrupted. Just create a new one using the options and start with the new one. All fixed.
Go to link download
Linux Mint 12 GNOME Freeze Hang Up Problem
Linux Mint 12 GNOME Freeze Hang Up Problem
Linux Mint is probably the distro that fixes all the mistakes that Ubuntu makes. Its built on the Ubuntu base while keeping a very light weight taste to it.
Recently the Lisa (12) release of Mint was released with various Desktop Environment including GNOME. Ive installed it and it was pretty good to me until a very annoying error was being caused by GNOME. It hung up at very random time forcing me to reboot the system using a Hard Boot. Later on I found this fix that reportedly solved the problem to some extent but still has some issues with Banshee Media Player. Anyway heres the how.
First download this file: Link 1
Go to the directory where you downloaded this file and run this command
Recently the Lisa (12) release of Mint was released with various Desktop Environment including GNOME. Ive installed it and it was pretty good to me until a very annoying error was being caused by GNOME. It hung up at very random time forcing me to reboot the system using a Hard Boot. Later on I found this fix that reportedly solved the problem to some extent but still has some issues with Banshee Media Player. Anyway heres the how.
First download this file: Link 1
Go to the directory where you downloaded this file and run this command
sudo patch /usr/share/gnome-shell/extensions/mediaplayer@linuxmint.com/extension.js mgse-mediaplayer.diff
Then download this file: Link 2
sudo patch /usr/share/gnome-shell/extensions/mediaplayer@linuxmint.com/extension.js mgse-mediaplayer.diff
NOTE: Both the files have the same name so my commands are also same. But if you dont replace the first file with the second when downloading then you might need to change the command as per your files name.
This should fix the problem.
Source: [ Launchpad, Linux Mint Forums ]
Go to link download
Monday, November 28, 2016
How to Uninstall Linux Remove GRUB Go back to hell
How to Uninstall Linux Remove GRUB Go back to hell
Many users, mostly pretentious Linux enthusiasts come to me and ask "How to uninstall Linux". Apart from trying my best to hide my disgust (personal reasons, no offense), most of the time I answer like "Its hard to make you understand the process". Today when I was browsing the "How to" section of my favorite distro, I stumbled upon a collection of methods to do this. Heres the link:
[ http://forums.linuxmint.com/viewtopic.php?f=42&t=98051 ]
Directly quoting them in case the link becomes inactive when the info is needed. Method 1: Let me begin by saying I think Mint 12 is a terrific OS, which I am using on several computers. But I have computers on which I use Music Bee in Windows 7 for my music files and want direct boot to Windows without any disk space devoted to Mint. I spent several days looking at complicated instructions for removing Grub and finally accidentally discovered a simple solution, which is as follows: In Windows, download Partition Wizard at http://download.cnet.com/MiniTool-Partition-Wizard-Home-Edition/3000-2094_4-10962200.html. Install. Partitioning will be blocked by Grub. But on your left hit Rebuild MBR. This will take only a few seconds. Reboot, and Windows 7 will boot. Then you can go into Partition Wizard and eliminate the Ubuntu partitions and expand your Windows data partition to take up the freed up space.
Method 2: 1. Boot-Repair iso burnt into a CD will boot and, if you opt for fix mbr, then only windows will boot, provied Windows is on the first partition, of course. Partitions are not deleted.
Download site:
https://help.ubuntu.com/community/Boot-Repair
2. Another way, from Windows itself, run the free windows utility called mbrfix.
I used both, and both work great.
Method 3: Much easier way: Remove Grub bootloader using LILO.
1. Open terminal and run commands
sudo apt-get update
sudo apt-get install lilo
sudo lilo -M /dev/sda mbr # assuming that grub is installed to disk sda
A video about removing: http://www.youtube.com/watch?v=oB8NVzkgdEA&feature=plcp
Note: This method might need a Live Boot
[ http://forums.linuxmint.com/viewtopic.php?f=42&t=98051 ]
Directly quoting them in case the link becomes inactive when the info is needed. Method 1: Let me begin by saying I think Mint 12 is a terrific OS, which I am using on several computers. But I have computers on which I use Music Bee in Windows 7 for my music files and want direct boot to Windows without any disk space devoted to Mint. I spent several days looking at complicated instructions for removing Grub and finally accidentally discovered a simple solution, which is as follows: In Windows, download Partition Wizard at http://download.cnet.com/MiniTool-Partition-Wizard-Home-Edition/3000-2094_4-10962200.html. Install. Partitioning will be blocked by Grub. But on your left hit Rebuild MBR. This will take only a few seconds. Reboot, and Windows 7 will boot. Then you can go into Partition Wizard and eliminate the Ubuntu partitions and expand your Windows data partition to take up the freed up space.
Method 2: 1. Boot-Repair iso burnt into a CD will boot and, if you opt for fix mbr, then only windows will boot, provied Windows is on the first partition, of course. Partitions are not deleted.
Download site:
https://help.ubuntu.com/community/Boot-Repair
2. Another way, from Windows itself, run the free windows utility called mbrfix.
I used both, and both work great.
Method 3: Much easier way: Remove Grub bootloader using LILO.
1. Open terminal and run commands
sudo apt-get update
sudo apt-get install lilo
sudo lilo -M /dev/sda mbr # assuming that grub is installed to disk sda
A video about removing: http://www.youtube.com/watch?v=oB8NVzkgdEA&feature=plcp
Note: This method might need a Live Boot
Go to link download
Saturday, November 26, 2016
Fixing Netbeans font problem in Linux
Fixing Netbeans font problem in Linux
Netbeans shows really awful fonts when you run it on Linux based systems. The reason behind is not actually Linux itself. Its the default arguments used to invoke the Java stuff that Netbeans uses. It, by default, never invokes Anti Aliasing. Thus for, the ugly fonts. Time to fix this. Source [ https://thomashunter.name/blog/enabling-anti-aliasing-in-the-netbeans-editor/ ]
ATTENTION: The following method will always start Netbeans with Anti aliasing on. If you want otherwise, you should try using the extra arguments with the command you use to invoke Netbeans.
1. First locate netbeans.conf. I did that using the command
2. Open the file and look for the line
3. Between the quotes, youll see some Java related arguments. What you have to do is, make the line look like this
ATTENTION: The following method will always start Netbeans with Anti aliasing on. If you want otherwise, you should try using the extra arguments with the command you use to invoke Netbeans.
1. First locate netbeans.conf. I did that using the command
But, it usually is found in the directory
locate netbeans.conf
/usr/local/netbeans-[version]/etc/netbeans.conf
2. Open the file and look for the line
netbeans_default_options=
3. Between the quotes, youll see some Java related arguments. What you have to do is, make the line look like this
netbeans_default_options="-J-client -J-Xss2m -J-Xms32m -J-XX:PermSize=32m -J-XX:MaxPermSize=200m
-J-Dapple.laf.useScreenMenuBar=true -J-Dapple.awt.graphics.UseQuartz=true
-J-Dsun.java2d.noddraw=true -J-Dswing.aatext=true -J-Dawt.useSystemAAFontSettings=on"
Go to link download
Wednesday, November 16, 2016
Z Shell the fancy in Linux terminal
Z Shell the fancy in Linux terminal
Z Shell is probably now the best known Shell option for Unix users all over the globe. That too contributed by the fact that most people take the Terminal they get as full and final and never give a second thought about its improvement. But geeks cant resist exploring and the first option they get astounds them because Z Shell, if compared to Bash, is simple a super set of its functionality. It gives us a great Terminal which is intelligent and customizable to the point where people might ask you "Which terminal is this?".
Installation: This is fairly simple. Just a quick apt-get
Configuration: After you have installed Z Shell, the very first thing you have to do launch is type in your terminal /.zshrc.
After you have configured the shell, you can make it your default shell using the command
Configuration repositories: Some great configurations for Zsh have come up with full modular support and themes that will make your experience with Z a breeze. These are the most popular to repositories.
Using these pre-built configurations is very easy. Such as, configuring with Prezto. You need to type in the following after launching Z Shell. The commands will create Z Shell configurations in your home directory.
Installation: This is fairly simple. Just a quick apt-get
sudo apt-get install zsh

The first you do this, you will get some configuration manual that is navigated using numbers. The procedures are very self explanatory. It helps you configure various Options such as
zsh
- How far back in time do you want to remember commands
- If you want the shell to search history using partially entered commands (Its neat and powerful)
- Should all of your terminals be in sync while running
After you have configured the shell, you can make it your default shell using the command
chsh-s /bin/zsh
Configuration repositories: Some great configurations for Zsh have come up with full modular support and themes that will make your experience with Z a breeze. These are the most popular to repositories.
- Oh My Zsh
- Prezto
Using these pre-built configurations is very easy. Such as, configuring with Prezto. You need to type in the following after launching Z Shell. The commands will create Z Shell configurations in your home directory.
This will simple clone the repository into your home folder and then, link the configurations in place of your current configurations.
git clone --recursive https://github.com/sorin-ionescu/prezto.git "${ZDOTDIR:-$HOME}/.zprezto"
setopt EXTENDED_GLOB
for rcfile in "${ZDOTDIR:-$HOME}"/.zprezto/runcoms/^README.md(.N); do
ln -s "$rcfile" "${ZDOTDIR:-$HOME}/.${rcfile:t}"
done
Go to link download
Monday, November 14, 2016
Installing openERP in Linux Ubuntu
Installing openERP in Linux Ubuntu
The DEB file supplied by OpenERP site works but you need two extra packages. So, first run this command.
password: openpgpwd
The default admin password or the Master password is: admin
Then do the
sudo apt-get install postgresql-common postgresql-9.1
In case you find some dependency issues just use
sudo dpkg -i [the deb file]
Afterward you can access openerp in
sudo apt-get -f install
Use the username: openpg
http://localhost:8069/web/webclient/home
password: openpgpwd
The default admin password or the Master password is: admin
Go to link download
Labels:
in,
installing,
linux,
openerp,
ubuntu
Wednesday, November 2, 2016
Mounting MTP Android in Linux
Mounting MTP Android in Linux
Got this from : http://blog.mpshouse.com/?p=609 This is another one : http://forum.xda-developers.com/showthread.php?t=2055563
This is a quick how to get MTP working on Linux, the guide is for distros based on Debian (mintdebianubuntu) OpenSuse, Fedora AND Gentoo. If theres any missing for major distros let me know, or add them to a separate post and ill put them up here
***Debian based distros**
Code:
sudo apt-get install mtpfs
sudo mkdir /media/onex
sudo chmod 775 /media/onex
sudo mtpfs -o allow_other /media/onex
gedit /etc/udev/rules.d/51-android.rules
and add the following line:
SUBSYSTEM=="usb", SYSFS{idVendor}=="0bb4", MODE="0666"
and then:
sudo service udev restart
Code:
pacman -S libmtp
After installation, you have several mtp tools available. Upon connecting your MTP device, you use:
mtp-detect
and add the following line:
SUBSYSTEM=="usb", SYSFS{idVendor}=="0bb4", MODE="0666"
and then reload udev rules:
udevadm control --reload
**RedhatFedora16**
First of all, I using my computer with other people, who can come over the network, so the 0666 mode bits not a right choice for me. I make it all on a fedora 16, but the distro is really not important.
So the steps:
- add a user to the "disk" group (or whatever You want)
- make a mount point (the media doesnt work for me, across the init removes the content)
- add this mount point to the fstab, with some parameter
- create udevd rules
- restart udevd
- install fuse-mtpfs
- (re)login user
- try it
My common experience is that, the mtpfs is very very very very slow. Really slow, so I can use it only with CLI, any GUI has been coming back with time out
And the "code":
Code:
usermod -a -G disk $LOGINUSER
Code:
sudo mkdir /mnt/sgs2 ; sudo chgrp disk /mnt/sgs2; sudo chmod 0770 /mnt/sgs2
Code:
sudo echo "mtpfs /mnt/sgs2 fuse users,noauto 0 0" >> /etc/fstab
Code:
cat > /etc/udev/rules.d/51-android.rules <<EOF
SUBSYSTEM!="usb_device", GOTO="label_end"
ACTION!="add", GOTO="label_end"
# ATRRS{idVendor}== ertekei:
#Acer 0502
SUBSYSTEM=="usb",ATTRS{idVendor}=="0502",MODE="0660",GROUP="disk"
#ASUS 0b05
SUBSYSTEM=="usb",ATTRS{idVendor}=="0b05",MODE="0660",GROUP="disk"
#Dell 413c
SUBSYSTEM=="usb",ATTRS{idVendor}=="413c",MODE="0660",GROUP="disk"
#Foxconn 0489
SUBSYSTEM=="usb",ATTRS{idVendor}=="0489",MODE="0660",GROUP="disk"
#Fujitsu 04c5
SUBSYSTEM=="usb",ATTRS{idVendor}=="04c5",MODE="0660",GROUP="disk"
#Fujitsu Toshiba 04c5
SUBSYSTEM=="usb",ATTRS{idVendor}=="04c5",MODE="0660",GROUP="disk"
#Garmin-Asus 091e
SUBSYSTEM=="usb",ATTRS{idVendor}=="091e",MODE="0660",GROUP="disk"
#Google 18d1
SUBSYSTEM=="usb",ATTRS{idVendor}=="18d1",ATTRS{idProduct}=="4ee1",MODE="0660",GROUP="disk"
#Hisense 109b
SUBSYSTEM=="usb",ATTRS{idVendor}=="109b",MODE="0660",GROUP="disk"
#HTC 0bb4
SUBSYSTEM=="usb",ATTRS{idVendor}=="0bb4",MODE="0660",GROUP="disk"
#Huawei 12d1
SUBSYSTEM=="usb",ATTRS{idVendor}=="12d1",MODE="0660",GROUP="disk"
#K-Touch 24e3
SUBSYSTEM=="usb",ATTRS{idVendor}=="24e3",MODE="0660",GROUP="disk"
#KT Tech 2116
SUBSYSTEM=="usb",ATTRS{idVendor}=="2116",MODE="0660",GROUP="disk"
#Kyocera 0482
SUBSYSTEM=="usb",ATTRS{idVendor}=="0482",MODE="0660",GROUP="disk"
#Lenovo 17ef
SUBSYSTEM=="usb",ATTRS{idVendor}=="17ef",MODE="0660",GROUP="disk"
#LG 1004
SUBSYSTEM=="usb",ATTRS{idVendor}=="1004",MODE="0660",GROUP="disk"
#Motorola 22b8
SUBSYSTEM=="usb",ATTRS{idVendor}=="22b8",MODE="0660",GROUP="disk"
#NEC 0409
SUBSYSTEM=="usb",ATTRS{idVendor}=="0409",MODE="0660",GROUP="disk"
#Nook 2080
SUBSYSTEM=="usb",ATTRS{idVendor}=="2080",MODE="0660",GROUP="disk"
#Nvidia 0955
SUBSYSTEM=="usb",ATTRS{idVendor}=="0955",MODE="0660",GROUP="disk"
#OTGV 2257
SUBSYSTEM=="usb",ATTRS{idVendor}=="2257",MODE="0660",GROUP="disk"
#Pantech 10a9
SUBSYSTEM=="usb",ATTRS{idVendor}=="10a9",MODE="0660",GROUP="disk"
#Pegatron 1d4d
SUBSYSTEM=="usb",ATTRS{idVendor}=="1d4d",MODE="0660",GROUP="disk"
#Philips 0471
SUBSYSTEM=="usb",ATTRS{idVendor}=="0471",MODE="0660",GROUP="disk"
#PMC-Sierra 04da
SUBSYSTEM=="usb",ATTRS{idVendor}=="04da",MODE="0660",GROUP="disk"
#Qualcomm 05c6
SUBSYSTEM=="usb",ATTRS{idVendor}=="05c6",MODE="0660",GROUP="disk"
#SK Telesys 1f53
SUBSYSTEM=="usb",ATTRS{idVendor}=="1f53",MODE="0660",GROUP="disk"
#Samsung 04e8
SUBSYSTEM=="usb",ATTRS{idVendor}=="04e8",ATTRS{idProduct}=="6860",MODE="0660",GROUP="disk"
#Sharp 04dd
SUBSYSTEM=="usb",ATTRS{idVendor}=="04dd",MODE="0660",GROUP="disk"
#Sony 054c
SUBSYSTEM=="usb",ATTRS{idVendor}=="054c",MODE="0660",GROUP="disk"
#Sony Ericsson 0fce
SUBSYSTEM=="usb",ATTRS{idVendor}=="0fce",MODE="0660",GROUP="disk"
#Teleepoch 2340
SUBSYSTEM=="usb",ATTRS{idVendor}=="2340",MODE="0660",GROUP="disk"
#Toshiba 0930
SUBSYSTEM=="usb",ATTRS{idVendor}=="0930",MODE="0660",GROUP="disk"
#ZTE 19d2
SUBSYSTEM=="usb",ATTRS{idVendor}=="19d2",MODE="0660",GROUP="disk"
LABEL="label_end"
Code:
udevadm control --reload-rules
Code:
yum/apt-get/pacman/etc install mtpfs
Code:
mptfs
[CODE]$LOGINUSER@mir:~$ mtpfs
Listing raw device(s)
Device 0 (VID=04e8 and PID=6860) is a Samsung Galaxy models (MTP).
Found 1 device(s):
Samsung: Galaxy models (MTP) (04e8:6860) @ bus 2, dev 4
Attempting to connect device
Android device detected, assigning default bug flags
Listing File Information on Device with name: (NULL)
fuse: missing mountpoint parameter
And finally mount /it must be working now with user account/:
Code:
mount /mnt/sgs2
Code:
umount /mnt/sgs2
this method will work for music and photos access only,
Code:
sudo zypper addrepo -f http://packman.inode.at/suse/12.2/ packman
sudo zypper ref (type a to always accept the packman repo)
sudo zypper in mtpfs
sudo vim /lib/udev/rules.d/69-libmtp.rules and add the following line (replace vim with gedit if you want a gui editor)
# HTC One X+
ATTR{idVendor}=="0bb4", ATTR{idProduct}=="0dfc", SYMLINK+="libmtp-%k", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1"
sudo cp /lib/udev/rules.d/69-libmtp.rules /etc/udev/rules.d/.
reboot
When you plug in the phone you will see android phone icon on the desktop click on it to browse your files.
disable any media players from trying to read the device...
** Gentoo **
Code:
Prerequisites
If your device is not recognized by libmtp, try upgrading to latest (or even git) version.
User needs to be in group plugdev to mount device.
MTPFS
You need to add option: user_allow_other in /etc/fuse.conf
$ mkdir ~/AndroidDevice
$ mtpfs -o allow_other ~/AndroidDevice
NOTE: this can take really long time, up to several minutes. As an indication of successful mount the mtpfs will go to background.
To unmount:
$ /usr/bin/fusermount -u ~/AndroidDevice
If mtpfs doesnt work for you try updating to latest version first.
Go-MTPFS
Seems to be more stable
$ emerge -a go
$ mkdir ~/go
$ export GOPATH=/home/$USER/go
$ go get github.com/hanwen/go-mtpfs
To mount:
$ ~/go/bin/go-mtpfs ~/AndroidDevice
To unmount:
$ /usr/bin/fusermount -u ~/AndroidDevice
Troubleshooting
Sometimes (e.g. on HTC One X) USB debugging automatically turns on when device is connected to PC. You need to turn debugging off, otherwise libmtp cant recognise device.
Make sure your Android device is not going to sleep and the screen is not getting locked. Set screen timeout to very long values, or enable in Development section flag "Do not turn off the screen".
Go to link download
Sunday, October 30, 2016
Linux Ubuntu Fix MATLAB on an NTFS Partition
Linux Ubuntu Fix MATLAB on an NTFS Partition
To start with, I was in a huge mess yesterday because today was my Image Processing exam and all of a sudden, MATLAB wasnt working on my computer (Linux Mint). Apart from installing in a Windows partition, everything was exactly the same as the last one and I didnt have a Windows version to go to. It started throwing all sorts of errors related with Java and JVM. 4 hours from the exam I still didnt have any luck, when all of a sudden searching with the Error strings, I hit an Ubuntu forums page describing the same scenario as mine. MATLAB on an NTFS Partition. This was also the first time I used the fstab file in Linux.
Source: [ http://ubuntuforums.org/showthread.php?p=10157469#post10157469 ]
First, Linux cannot change permisssions on a Windows filesystem outside of a mount or through fstab. This is the way its always been. Second, the default permissions set on mounting NTFS partitions through File Manager has changed since Gutsy which is why it used to work and now it doesnt. You will need to automount your partition by adding a line to fstab so that you can force the permissions you want. The general steps to automount are as follows:
[1] Go back to File Manager and unmount the drive (Or use a command, your choice. Generally I use
[2] Create a permanent mount point for the partition
[3] Find out how you system sees your partition
Youll get something that looks like this:
[4] Using the info above as an example you would add a line in fstab that looks like this:
This might be a bit different for your system. Just open the fstab file using nano, using
and see how your system lists them. If your system uses UUID, replace the first part with the UUID
[5] Running the following command will check for errors and mount the partition:
Source: [ http://ubuntuforums.org/showthread.php?p=10157469#post10157469 ]
First, Linux cannot change permisssions on a Windows filesystem outside of a mount or through fstab. This is the way its always been. Second, the default permissions set on mounting NTFS partitions through File Manager has changed since Gutsy which is why it used to work and now it doesnt. You will need to automount your partition by adding a line to fstab so that you can force the permissions you want. The general steps to automount are as follows:
[1] Go back to File Manager and unmount the drive (Or use a command, your choice. Generally I use
sudo umount /media/<partition-name>
[2] Create a permanent mount point for the partition
sudo mkdir /media/NTFS1
[3] Find out how you system sees your partition
sudo blkid -c /dev/null
Youll get something that looks like this:
/dev/sda2: LABEL="WinXP2" UUID="DA9056C19056A3B3" TYPE="ntfs"
[4] Using the info above as an example you would add a line in fstab that looks like this:
/dev/sda2 /media/NTFS1 ntfs defaults 0 0
This might be a bit different for your system. Just open the fstab file using nano, using
sudo nano /etc/fstab
and see how your system lists them. If your system uses UUID, replace the first part with the UUID
UUID=DA9056C19056A3B3 /media/NTFS1 ntfs defaults 0 0
[5] Running the following command will check for errors and mount the partition:
sudo mount -aThat, should do it. Now try running MATLAB. Hopefully there wont be any errors.
Go to link download
Wednesday, October 19, 2016
Linux Mint 13 Lisa Fix screen going blank when Laptop lid is closed
Linux Mint 13 Lisa Fix screen going blank when Laptop lid is closed
In my workplace they have Linux Mint 13 setup for the machines. I personally hate it and my employer too, so we will be shifting to some other Distro very soon, but in the mean time I had to make do with it. We have an extra display attached to every laptop. One of the things that bugs me the most is the "Power management" doesnt have any "Do nothing" option. And if you somehow (yes, theres a way) make it appear, it does the exact same thing as "Blank screen", so yeah, "Aw snap!!". It didnt take much of googling to find Mint forum page that solved the problem though [ http://forum.linuxmint.com/viewtopic.php?t=106532&f=208 ]
Basically the problem is caused by a faulty assumption in design. It always executes and Screen Blank instruction set, when you close the laptop lid. What you have to do is just comment out one line in the event handler script.
1. First open the file, you might need root rights to edit this, so use sudo if you need
Basically the problem is caused by a faulty assumption in design. It always executes and Screen Blank instruction set, when you close the laptop lid. What you have to do is just comment out one line in the event handler script.
1. First open the file, you might need root rights to edit this, so use sudo if you need
/etc/acpi/lid.sh2. The find the line
. /usr/share/acpi-support/screenblank3. Comment that line out with
#It should be fixed immediately.
Go to link download
Wednesday, October 12, 2016
Change FAT NTFS file attributes from Linux
Change FAT NTFS file attributes from Linux
The original use case was born for me when one of my friends gave me a memory card that was infected by the hidden file virus (he calls it so). All of the files were applied the +S +H +R attributes which made the file System file, Hidden and Read only respectively. For this reason he could not see them in his cell phone which depended on this attributes (Nokia Symbian OS).
I personally dont like to work with Microsoft born tools, so instead of booting into my Windows 7 installation (I usually never do that), I wanted to find a way that allowed me to change these attributes right from my Linux installation. There it came, the awesome mtools toolset.
To change the file attributes, you first need to switch into that directory (which points to the card). But the mtools have a catch. They do not let you work with them, unless you ignore some errors. And to instruct it to do so, you have to make an RC file that will do just that right before one of tools takes any actions. The location of the RC file will be
Then change into your drive
Credits due:
http://blogs.gnome.org/diegoe/2012/04/21/removing-the-hiddensystem-bit-of-vfatfat32-files-on-gnulinux/
I personally dont like to work with Microsoft born tools, so instead of booting into my Windows 7 installation (I usually never do that), I wanted to find a way that allowed me to change these attributes right from my Linux installation. There it came, the awesome mtools toolset.
To change the file attributes, you first need to switch into that directory (which points to the card). But the mtools have a catch. They do not let you work with them, unless you ignore some errors. And to instruct it to do so, you have to make an RC file that will do just that right before one of tools takes any actions. The location of the RC file will be
or
~/.mtoolsrc
The contents have to be
/home/<user>/.mtoolsrc
The significance of the first line is, it assigns the directory into drive S. it could be anything else, like C, D, E etc. The second line tells mtools to check for some errors, it has to be set to not check because otherwise it refuses to operate on the drive (please dont look at me, I just copied it from somewhere)
drive s: file="/dev/<your-usb-drive>"
mtools_skip_check=1
Then change into your drive
And change the attributes (actually unset them) for all the files
$ mattrib -/ s:
Thats it :)
$ mattrib -/ -h -s -r s:
Credits due:
http://blogs.gnome.org/diegoe/2012/04/21/removing-the-hiddensystem-bit-of-vfatfat32-files-on-gnulinux/
Go to link download
Sunday, October 9, 2016
Linux WiFi card installation instructions collection
Linux WiFi card installation instructions collection
One way or the other I face problems with new installation of Linux distros and setting up WiFi on them. So, Im creating a collection here for future reference. Might help somebody someday too. 1. BCM4311 [ http://askubuntu.com/questions/55868/how-to-install-a-broadcom-wireless-driver ]
Go to link download
Labels:
card,
collection,
installation,
instructions,
linux,
wifi
Monday, September 26, 2016
Linux File Manager Launchers
Linux File Manager Launchers
Only recently, Ive started to use Ubuntu (Linux Distro FTWDK). After fighting with the kernel night after night and constantly resulting with all sorts of crashes or f-ups, Ive finally decided to keep a Windows Dual Boot for my Gaming needs. Wine still isnt in much control yet. Anyway. I finished installing Ubuntu 11.10 and ofcourse, like all the ordinary users Ive failed to find my taste in the new Unity desktop. So, I decided to try all the others. I installed XFCE, Gnome, LXDE. Among all of these LXDE acted to be the fastest, though only time will tell because usually my Linux installations end up in begging me to not experiment with them anymore. I kind of liked the idea of having different File Managers. So I collected all of their Launcher strings. Here they are.
Nautilus : nautilus --no-desktop
PCMan : exo-open --launch FileManager %u
Thunar : thunar /home/username
Storing them for future crashes :P
Go to link download
Thursday, September 22, 2016
Fix fans running at full in Arch Linux vanilla Kernel 3 18 and up
Fix fans running at full in Arch Linux vanilla Kernel 3 18 and up
So, the other day I was tinkering with a fresh Arch installation and the very first issue that I ran into was my fan was rotating at full blast even though there was now processor load at all. While looking for a solution I was surprised to find that there were no actual solutions on the internet to these. I followed the path of "Fan speed control" in Arch Linux wiki and but no luck. Then I installed powertop
UPDATE: Apparently this did not bring the crazy fan speeds down. After some browsing around, I hit a thread in the ArchBang forums where it became pretty apparent that recent Kernel changes in 3.18 have triggered the issue and still has not been resolved. So, I had to downgrade to 3.17.6 which I did by following a well written guide here. What I basically did was
a. Went to the Arch official package database
b. Located the Linux package
c. On the upper right Package Section of the page, click on View Changes. There I located an earlier version, in this case upgpkg: linux 3.17.6-1
d. Located the revision number from the line that is like "file:///srv/svn-packages@177020". Thats the revision number after the @, it might be anything. e. Then to compile 3.17.6, did the following in the terminal. CAUTION: This process might take several hours, took me around 4 hours to compile the kernel
Credits: https://ask.fedoraproject.org/en/question/31514/how-to-change-cpu-temperature-thresholds-and-control-fan-speed/
https://nims11.wordpress.com/2013/02/17/downgrading-packages-in-arch-linux-the-worst-case-scenario/
Then I ran
pacman -S powertop
Used Tab to navigate to the "Turntables" area. Then changed the states of all "Bad" to "Good" as many as possible. Saved using "Esc" and then reboot. It worked :)
powertop
UPDATE: Apparently this did not bring the crazy fan speeds down. After some browsing around, I hit a thread in the ArchBang forums where it became pretty apparent that recent Kernel changes in 3.18 have triggered the issue and still has not been resolved. So, I had to downgrade to 3.17.6 which I did by following a well written guide here. What I basically did was
a. Went to the Arch official package database
b. Located the Linux package
c. On the upper right Package Section of the page, click on View Changes. There I located an earlier version, in this case upgpkg: linux 3.17.6-1
d. Located the revision number from the line that is like "file:///srv/svn-packages@177020". Thats the revision number after the @, it might be anything. e. Then to compile 3.17.6, did the following in the terminal. CAUTION: This process might take several hours, took me around 4 hours to compile the kernel
This will install the new kernel. You might face some dependency issues where it might ask for 3.18. I removed those packages. Rebooted the PC and it was fixed.
cd ~/Downloads
mkdir linux-kernel && cd linux-kernel
svn checkout --depth=empty svn://svn.archlinux.org/packages
cd packages
svn update -rlinux
cd linux/trunk/
makepkg -g >> PKGBUILD
makepkg -s
sudo pacman -U *.pkg.tar.xz
Credits: https://ask.fedoraproject.org/en/question/31514/how-to-change-cpu-temperature-thresholds-and-control-fan-speed/
https://nims11.wordpress.com/2013/02/17/downgrading-packages-in-arch-linux-the-worst-case-scenario/
Go to link download
Friday, September 9, 2016
Fix Linux startup problem after installing VMWare 9
Fix Linux startup problem after installing VMWare 9
VM Ware has released a version for Linux. Its a shell script installing the files in your / (root). While installing the application at one point it might output a black screen with all sorts of error messages. This is most likely caused by a conflict with the new kernel (version 3.5). It has been fixed but how do you fix your setup?? Well, following this method and combining a live setup (USB, SD Card, Live CD/DVD) we can address the issue. Follow the instructions below.
1. First make a Live setup of your distribution or one of similar kind. I used Linux Mint 14 with KDE on a SD Card.
2. Boot into the Live setup.
3. Log in as root [ type { sudo su } and type your root password ]
4. Locate your setups root drive (the one with the mount point / in your original setup) and mount it. It will be assigned a mount point most probably using a UUID, note that down. Youll find that in /media of your Live setup. What I did as find a unique part of the mount points name and used it with { grep }. So, my mount point was /media/d4324-32d43-4242 and I used { ls | grep "d4324" }. You can ignore it and use the name provided directly.
5. Now use
6. Do these in the sequence
1. First make a Live setup of your distribution or one of similar kind. I used Linux Mint 14 with KDE on a SD Card.
2. Boot into the Live setup.
3. Log in as root [ type { sudo su } and type your root password ]
4. Locate your setups root drive (the one with the mount point / in your original setup) and mount it. It will be assigned a mount point most probably using a UUID, note that down. Youll find that in /media of your Live setup. What I did as find a unique part of the mount points name and used it with { grep }. So, my mount point was /media/d4324-32d43-4242 and I used { ls | grep "d4324" }. You can ignore it and use the name provided directly.
5. Now use
/media/$(ls /media/| grep "d4324" )before every directory mentioned here. Or you can ignore the
/media/$(ls /media/| grep "d4324" )part and instead use
/media/<your-mount-point>directly.
6. Do these in the sequence
After that, try booting into your system. If all has gone well, you should be leaving a breath of relief.
cd /media/$(ls /media/| grep "d4324" )/lib/modules/<your-kernel-version>/misc
# Note: If you have multiple kernel directories in the /lib/modules/ directory do the following for each one of them. If the files are not found in any kernel directory, ignore and go on with the commands.
mv vm* /tmp
cd /media/$(ls /media/| grep "d4324" )/proc/modules/
rm vmnet.o
rm vmmon.o
rm vmci.o
rm vmblock.o
rm vmppuser.o
rm /media/$(ls /media/| grep "d4324" )/etc/rc2.d/*vmware*
rm /media/$(ls /media/| grep "d4324" )/etc/rc3.d/*vmware*
rm /media/$(ls /media/| grep "d4324" )/etc/rc5.d/*vmware*
rm /media/$(ls /media/| grep "d4324" )/etc/rc6.d/*vmware*
rm -rf /media/$(ls /media/| grep "d4324" )/etc/vmware*
rm /media/$(ls /media/| grep "d4324" )/usr/bin/vmware-usbarbitrator
rm /media/$(ls /media/| grep "d4324" )/usr/bin/vmnet*
rm -r /media/$(ls /media/| grep "d4324" )/usr/lib/vmware*
rm -r /media/$(ls /media/| grep "d4324" )/usr/share/doc/vmware*
Go to link download
Saturday, August 27, 2016
Linux Plugin directories for Chromium Browser and Mozilla Firefox
Linux Plugin directories for Chromium Browser and Mozilla Firefox
For Firefox, its
And for Chromium its
~/.mozilla/plugins
/usr/lib/chromium-browser/plugins
Go to link download
Wednesday, August 24, 2016
Linux shell cheatsheet Can it become one
Linux shell cheatsheet Can it become one
I love the command line, the CLI. I wish somethings were a little bit different allowing me to use CLI for every task, but the world is a cruel place, apart from stupid M$ mistakes regarding their crappy GUI. You do realize there wouldnt be such a crappy product without dependency on the GUI, right?
Im not categorizing it right now, because theres not much to categorize actually
Im not categorizing it right now, because theres not much to categorize actually
Show line number in "grep" output: grep "text" -n
Go to link download
Subscribe to:
Posts (Atom)