Showing posts with label Linux. Show all posts
Showing posts with label Linux. Show all posts

Monday, March 6, 2017

Not able to login on Fedora 25

I got a new laptop at work place and it came with some other linux OS (other than Fedora). I installed Fedora 25 and when I tried to login, it started throwing me out each and every time. Still the problem is there, but here is a work around:

Reason: Something is crashing with X server

Solution Tried:
1. Ctrl + Alt + Fx (Fx F2 F3 F4 etc.)
2. Login as user from command line
3. type and enter:
     startx

It is a temporary solution, will update here as soon as I fill find one.

Monday, November 26, 2012

HOW TO add color to root vi ?

I usually prefer vi over gedit or others, but whenever I use vi as root , it doesnt show any color. Here is a way to set color right in vi as root.

Open your bashrc file:
#vi /root/.bashrc
and add this line
alias vi='vim'

then run #source /root/.bashrc


You can also test which vi you are using by running "which vi" both as root and normal user.

remember $ is for normal mode and # is for super user mode.
All done !!

Sunday, July 22, 2012

New To Linux ?

I have seen many who tried their hands on linux and end up back to windows. Many students who got stuck up with the question How will I do this in Linux? which is best distro ? where to get help ? So I decided this will help those who want to try their hands on linux and who are looking for doing everything with linux. First thing first, you can use any distribution that you want Ubuntu, Sabayon, Centos, Mint, OpenSuse, Fedora etc. these are just few out of a big list, you can check and get information about all this at Distrowatch. But my personal advice, if you are a programmer or engineering student then try with fedora else for everyone else try ubuntu. Now, you can get the installation instructions through web or through the home pages of distribution. Here are some places where you can get all the information and answers to your 'how to ' questions. There are some forums also where you can browse the solutions to common porblems and also ask some new Fedora Forum Ubuntu Forum Linux Forum Linux Questions And if you are looking to find the alternatives for your windows softwares then try this Alternative to Open Site Solutions Open Source As Alternatives If you are looking for reasons why you should switch to linux then try this Why Linux is Better ? you can also google out for videos, Usually, every linux distros has their own repositories from where you can install the packages but there is one more great place to look for some great softwares like SourceForge For now thats all ! Please comment with more links and description so that many others get benefit ;) Knowledge belongs to all, Follow opensource !

Monday, April 23, 2012

How to Switch from GDM to KDM ?

Step 1: create a file "desktop"
Step 2: In "desktop" put this:
           DISPLAYMANGER="KDE"
save the file.
Step 3: copy the file in "\etc\sysconfig"
For this, open the terminal and run "sudo cp desktop /etc/sysconfig"
or su and then copy.
Step 4: reboot



Posted from GScribble.

Monday, October 10, 2011

How to Change Posix message Queue Size

The easiest way is

#sysctl -w fs.mqueue.msgsize_max=xxxx

This will change the size temporarily for permanent we need to make some changes in the sysctl config file. 

Saturday, January 15, 2011

How to Auto mount partitions on boot in Fedora ?

Normally in windows when we login in we see all the partitions or drives e.g. c: d: etc. This was when I was a windows user, that means long time back I think more than a decade :). Now, when we login into fedora or ubuntu, we have to click the partitions to mount them, they are not automatically mounted. So, If you are looking for a method by which you can make them auto mount then here are steps: (for ubuntu you can get some utility, which will do the required task , but still you can follow this steps )

Step 1: open disk utility and note down the partition / drive labels and corresponding device names e.g. /dev/sda6 etc.
Disk Utility Partition Name and Label
Step 2: go to the terminal and either su or use sudo

Step 3: run the following commands
$cd /media/
$mkdir <drive label> e.g. mkdir Songs
the second command will create folder in the media directory. All the drives will be mounted in media only. So, if you are having 3 drives to mount then create 3 folders by their name. This is what I follow, name of the folder and partition : same. you can name the folders according to your wish also. That means if the partition label is "Softwares" then create a folder named "Softwares" , this is a easy way to avoid confusion between mounted partitions.

Step 4: open the fstab file which is located in /etc/ in any editor you want
e.g.
$vi /etc/fstab
OR
$gedit /etc/fstab

Step 5: Till now we having the names of the partitions with their respective drive letters (/dev/sdax) and folders created in /media/, this is where we will mount our volumes. We can mount the volume with different permissions, like only read permission to all users and write permission reserved for root, or read and write permission to every one etc.

Here is how my fstab looks like, before mounting the partitions:

#
# /etc/fstab
# Created by anaconda on Fri Nov  5 00:27:12 2010
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
UUID=8d1eeb21-4503-4e3f-b4d5-98ce1a7987dc /                       ext4    defaults        1 1
UUID=3c478764-9183-48e0-8676-2ca168d965cd /boot                   ext4    defaults        1 2
UUID=ea5c7972-26de-4f4e-81e0-4890f9942557 /home                   ext4    defaults        1 2
UUID=1b9dd3f0-bac2-407b-a5a8-2b496945d2b4 swap                    swap    defaults        0 0
tmpfs                   /dev/shm                tmpfs   defaults        0 0
devpts                  /dev/pts                devpts  gid=5,mode=620  0 0
sysfs                   /sys                    sysfs   defaults        0 0
proc                    /proc                   proc    defaults        0 0


Now in the opened fstab file add new lines, e.g. we want to mount a ntfs partition named Songs , and we are having the drive letters as /dev/sda5, we want to give read write to every one, and we already created a folder named Songs in '/media'

add the line in the fstab file

/dev/sda5 /media/Songs   ntfs-3g defaults 0 0

which gives me:
#
# /etc/fstab
# Created by anaconda on Fri Nov  5 00:27:12 2010
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
UUID=8d1eeb21-4503-4e3f-b4d5-98ce1a7987dc /                       ext4    defaults        1 1
UUID=3c478764-9183-48e0-8676-2ca168d965cd /boot                   ext4    defaults        1 2
UUID=ea5c7972-26de-4f4e-81e0-4890f9942557 /home                   ext4    defaults        1 2
UUID=1b9dd3f0-bac2-407b-a5a8-2b496945d2b4 swap                    swap    defaults        0 0
tmpfs                   /dev/shm                tmpfs   defaults        0 0
devpts                  /dev/pts                devpts  gid=5,mode=620  0 0
sysfs                   /sys                    sysfs   defaults        0 0
proc                    /proc                   proc    defaults        0 0
/dev/sda5 /media/WareHouse ntfs-3g defaults 0 0
/dev/sda6 /media/Installations ntfs-3g defaults 0 0
/dev/sda7 /media/SoftwareWareHouse ntfs-3g  defaults 0 0
/dev/sda8 /media/GeekWareHouse ntfs-3g defaults 0 0
/dev/sda9 /media/AudioWareHouse ntfs-3g defaults 0 0
/dev/sda10 /media/VideoWareHouse ntfs-3g defaults 0 0

For fat partitions, use vfat instead of ntfs-3g. Now, you are all set to go, save the file, remount the partitions or reboot, and check your /media/directory.

For a detailed discription of fstab , you can refer to this link: underStand Fstab

I hope this will help you to auto mount your partitions.

Monday, November 15, 2010

chkdsk on linux ??

So, if your boot log or the out put message of mount is telling you to boot in to windows and run chkdsk for ntfs partition, then do not worry, here is the solution for that. In linux, you can find many cli commands for ntfs partition, the only thing is they should be installed.
Problem Statement: $mount /dev/sda5 /media/folder
...
boot from windows and run chkdsk .............

If you are getting some error like this then , go to terminal, and

$ntfsfix /dev/sda5

All done, now try to mount the ntfs partition or reboot !!

You can also try many other utilities for ntfs partition by typing $ntfs<tab><tab> it will show many commands, e.g.

ntfs-3g           ntfs-3g.secaudit  ntfscat           ntfscluster       ntfscp            ntfsinfo          ntfsls            ntfsresize
ntfs-3g.probe     ntfs-3g.usermap   ntfsclone         ntfscmp           ntfsfix           ntfslabel         ntfsmount         ntfsundelete

now choose any and run 
$<command> --help OR $man <command name>

e.g.
$ntfsfix --help  OR $man ntfsfix

But it is really weired to see that linux is telling us to use windows for disk checking.
I hope soon they will change this :)