Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- # This script is intended to fix or change your display manager
- # It just chroots to your $device system and prints to you current
- # default display manager so you could change everything up.
- # Written on 18 january 2013 by Security XIII [at gmail dot com]
- # when I had a problem of not loading the DM (xdm broke my system somehow)
- # You can change a bit this if you want to
- # If you have separate /boot partition you MAYBE have to include it
- device="/dev/sda1"
- cmd="sudo mount"
- cmd2="$cmd --bind"
- fsname="/mnt"
- dev="/dev"
- proc="/proc"
- sys="/sys"
- # Stop changing here, please.
- $cmd $device $fsname
- $cmd2 $dev $fsname$dev
- $cmd2 $proc $fsname$proc
- $cmd2 $sys $fsname$sys
- sudo chroot $fsname
- dm=$(cat /etc/X11/default-display-manager)
- echo "Your current display manager is: $dm"
- echo "To change it, run nano /etc/X11/default-display-manager and edit manually"
- echo "To save in nano, press Ctrl+O and enter"
- echo "Recommended: /usr/sbin/gdm or /usr/sbin/lightdm"
Advertisement
Add Comment
Please, Sign In to add comment