fr.ench.info

Articles on “linux”

Using PhotoRec to Recover Deleted Files in Arch Linux

Posted on

Recently I accidentally deleted my xmonad.hs file which I've worked on for so long. I had no back up or a Trash folder whatsoever. I searched for a file recovery software that would bring back my config file. I took a look at Arch Linux's File Recovery wiki to try out the ones they've listed. The first software I tested was Extundelete unfortunately it seems to require me to unmount the device although the file resided on the same partition where my OS is so I didn't seem to work out for me. I also tried searching for a Windows program to recover files from an ext4 partition but unfortuna...

Fixing Initscripts

Posted on ,

I had a problem yesterday with my Archlinux installation. Everything was just going fine until I restarted my computer. Arch was trying to load the daemons and modules but can't seem to do it as there was an error saying "Read-only filesystem". I was thinking to simply remount it after Arch gives me a prompt though it never did. After some few research and inquiries in the #archlinux channel in Freenode, I was able to resolve this. The solution an arch user gave me: Used an Archlinux Live CD (mine was in a USB drive) to mount my Archlinux system that was not booting. Put sleep 60 in /et...

Current Xmonad Setup

Posted on ,

My xmonad.hs: import XMonad import XMonad.Hooks.DynamicLog import XMonad.Hooks.ManageDocks import XMonad.Util.Run(spawnPipe) import XMonad.Util.EZConfig import System.IO import XMonad.Layout.NoBorders import XMonad.Layout.IM import Data.Ratio ((%)) import XMonad.Layout.Grid import XMonad.Prompt import XMonad.Prompt.Shell import XMonad.Actions.GridSelect import XMonad.Layout.SimplestFloat import XMonad.Layout.Reflect import qualified XMonad.StackSet as W import XMonad.Layout.ResizableTile import XMonad.Layout.PerWorkspace import XMonad.Hooks.ManageHelpers myManageHook = composeAll [ (ro...

Setting Up Pianobar with lastfmsubmitd

Posted on ,

Pandora is a really neat, free internet radio service. I am using a console client for Pandora which is Pianobar. It's lacking one feature that I wanted though in which it would scrobble the music it plays over to Last.fm. Previously it did support scrobbling to Last.fm but has been moved. The author said you can make use an external scrobbler. For my external scrobbler I've used lastfmsubmitd. To set it up, you'll first need to have a script that would handle the events for Pianobar. You can use the eventcmd.sh script under contrib from Pianobar's source. For lastfmsubmitd, you can simply...

Quick Tip for Numeric and Textual File Permissions

Posted on

There are times that I would want to list the File permissions in the current working directory. To do this, I would use the ls -l command which lists the files and shows the Textual representation of file permissions. But for some reason I would want the Numeric representation such as 777, 755, etc. In order to achieve this, you can simply do stat -c "%a %n" *. If you often use this you may want to add in your .bashrc this line: alias statls='stat -c "%a %n"' Then reload your .bashrc by doing . ~/.bashrc. You can use the alias like so statls * or statls dir/*. For changing permissions, y...

Changing Username in Linux

Posted on ,

I tried changing my username on my Arch Linux install but somewhat caused a problem. I did the usual usermod -l newlogin oldlogin and renamed my HOME directory. I followed the instructions from this page. I tried logging in with the new username but for some reason, it wasn't logging me in. I was not able to spot any "useful information" in the logs - auth.log and user.log. Someone advised me to login from the root shell by calling the command login. This then gave me the error message. I obviously didn't change my HOME directory correctly as it was pointing to /home/old_login and goes t...

Uzbl - Minimalistic Web Browser

Posted on

Uzbl is a very nice browser — quite easy to use, navigation is through keybinds, has modes, and a lot more features. Uzbl can be taken here. A brief description of Uzbl taken directly from Wikipedia: Uzbl is a free and open source minimalistic web browser designed for simplicity and adherence to the Unix philosophy. Development started in early 2009 and is still considered in alpha software by the developers. The core component of uzbl is developed in C but other languages are also used, most notably Python. All parts of the uzbl project is released as free software under the GNU General...