Debian Jessie systemd autologin xfce4 polkit permission fix

9 06 2014

Recently things have changed in regard to policies and the way one logs in.

If your one of the few, like me, who doesn’t use a *dm for login and has suffered the polkit hassle of no suspend/hibernate or shutdown/reboot with Xfce4, there is a simple fix.

Parse a ‘– vt1’ to startx. In your .bashrc or .bash_profile, use the line,

[[ -z $DISPLAY && $XDG_VTNR -eq 1 ]] && exec startx -- vt1

Advertisements




android update and reroot

13 12 2013

Just a quick note for myself.

update notification.
remove busybox, remove franco’s kernel.
restore/install stock kernel.
twrp install /cache/
twrp install supersu.zip

#EDIT: After 2 updates, both times I’ve had errors due to Franco’s kernel backing up a file. Simple fix, remove the extension it places on it, something like .fkbu?





efibootmgr not working as intended.

24 05 2013

I just had a problem where efibootmgr wouldn’t save new boot entries and fail silently.

Running strace efibootmgr, it was saying “no space left on device”

I wont go into details of what’s happening but there’s an easy solution with kernel 3.9 and up.

Launch into the efi shell and add the option “efi_no_storage_paranoia” to your boot options.

Once the system is up and running like normal, you shouldn’t have a problem with efibootmgr anymore.

PROTIP: Add “efi_no_storage_paranoia” to your startup.nsh





Debian systemd autologin without a display manager

28 11 2012

UPDATE:

Create the directory:
sudo mkdir /etc/systemd/system/getty@tty1.service.d

Create file:
sudo vim /etc/systemd/system/getty@tty1.service.d/autologin.conf

Insert:
[Service]
ExecStart=
ExecStart=-/sbin/agetty --autologin <username> --noclear %I 38400 linux

ORIGINAL:

I just upgraded Wheezy to systemd which broke my autologin. It’s an easy fix.

Edit the file: ‘/etc/systemd/system/getty.target.wants/getty@tty1.service’

and find the line: ‘ExecStart=-/sbin/agetty %I 38400’

and change to: ‘ExecStart=-/sbin/agetty –noclear -a USERNAME %I 38400’

The –noclear is optional, it prevents the screen from clearing out the console messages.

wiki.debian.org/systemd





efi shell boot

27 08 2012

Once the shell is loaded, change into the directory where the .efi file resides.

shell> fs1:
shell> cd debian

boot the kernel

shell> vmlinuz.efi root=/dev/mapper/root initrd=\debian\initrd.img

note the backslashes.





dpkg error

5 04 2011

I just received an error while running aptitude,

dpkg: parse error, in file ‘/var/lib/dpkg/available’ near line 87 package ‘libxml-libxml-perl’: duplicate value for `Size’ field

The fix that worked for me was to issue a:

dpkg –clear-avail





rebuilding a mythtv recorded shows database

22 07 2010

Ok, so late one night I decided to upgrade my MythTV server… Yeah, I was bored with my insomnia.. 😉

I’ve kept it with Debian stable throughout the years but this time I wanted to give it lvm and ext4 (squeeze) and decided to jump into testing instead of pining it.

It had been awhile since I backed up my database and yes, I backed up everything to and external HDD but var.. After all, I did want a fresh install and it was late at night. 😛

Well the new installation went well and myth was working nicely but without my recordings that are on a separate drive under xfs. Sure it recorded new shows but bugger it, I wanted my old ones back.. My music and photos came back nicely after I rdiff’d my /home partition but my recordings!!???

Well this is what I did to recover them, google wasn’t so nice this time. 😉

This is on Debian but should give you a rough idea if on another *nix

First off, create a fresh database:

$ cd /usr/share/mythtv/sql

mysql -u root -p < mc.sql

Then restore your backup: 😉
This should work fine if your .mythtv/backuprc is present.

/usr/share/mythtv/mythconverg_restore.pl --filename /path/to/your/<mythtvbackupdir>/mythconverg-xxxxxxxxx.sql.gz

So now we have a working db up until your last backup but what about the rest of the recordings?

Thanks to Greg Froese you’ll find a perl script in /usr/share/doc/mythtv-backend/contrib/recovery/ called myth.rebuilddatabase.pl.gz

gunzip it, chmod 700 myth.re…

Run that with the options you require, I needed –pass and –dir but if you have a default setup you should be fine without any extra options.

As it goes through your recordings, it’ll prompt you for info on the ones it finds that aren’t already in the db. Although you can manually enter the details, which can be a bugger if you can’t remember what it was from the file name, “2099_20100523230000.mpg”,
I found it easier just to “enter” my way through the script and use myth itself, to fill in the blanks.

First off play the file so you can remember what it was exactly then press “M”, -> “recording options”, -> “change recording title” then fill in the title and subtitle for it.

Rinse and repeat.

You’ll now have your Myth back like nothing had gone wrong. 😉

PS. I wrote this down late at night the following night so I might of missed something.. 😛 Let us know if I have. 🙂