poniedziałek, 6 października 2014

How to install sdl2 library for Common Lisp through Quicklisp

Hello,
short post here, since topic isn't stretched.

Today, I tried installing SDL2 from Quicklisp, and failed. I couldn't compile SDL2. After quick web search, I knew what to do - solution is simple:
sudo apt-get install libsdl2-2.0-0 libsdl2-dbg libsdl2-dev
I'm not sure if you need dbg and dev, but it won't hurt for sure.
So, the problem is that SDL2 only downloads CL library - so, the wrappers for original SDL2. However, for SDL2-CL to succeed you need SDL2 library - which you can download from repository. If your repository doesn't contain SDL2, you can compile it from source - it isn't too hard.
Anyway, after downloading you just need to quickload sdl2 again and you're good to go. That's it!

Cheers!

piątek, 19 września 2014

How to upgrade to Jessie?

Hey!
After having some problems, I decided that the easiest solution would be reinstalling my OS. Since I have separate /home partition, this only meant that I'd have to install few programs back, so it wasn't much of a pain(turned out many useful things like emacs extensions etc. were saved on /home too, so I almost didn't notice reinstallation).

So, here is the tutorial for upgrading fresh installation of Crunchbang Waldorf from Wheezy to Jessie. If you do this on not fresh installation, remember that some things may go wrong. I strongly advise separate /home.
PS. The same works for Sid, you just have to replace corresponding Jessie things with Sid things.

1. Install Crunchbang.

Reason: well, pretty obvious.
Solution: Install Crunchbang.

2. Update and upgrade

Reason: if you don't do this, you'll meet some dependency problems later on.
Solution: Run 
sudo apt-get update && sudo apt-get upgrade

3. Remove some packages

Reason: Jessie comes with Gnome, and you're using Openbox. If you don't remove these packages, you'll have two DE that will collide. Long story short - if you don't do this, you'll face problems.
Solution: the packages that will be problem is girl1.2-gnomebluetooth-1.0 and gnome-bluetooth, both easy to find with autocompletion(tab). Remove them, and (optionally) install replacement: libsmbclient.
sudo apt-get remove gir1.2-gnomebluetooth-1.0 gnome-bluetooth tint2conf && sudo apt-get install libsmbclient

4. Change sources.list and preferences

Reason: You need sources.list pointing to Jessie in order to get Jessie's packages, and same goes with preferences.
Solution: First edit sources.list:
sudo geany /etc/apt/sources.list
There, you need to either comment out or remove everything that's inside, and replace it with sources.list genrated from here: http://debgen.simplylinux.ch/. If you don't know what to choose, select your country, 32- or 64-bit version, depending on what you installed(if you're unsure, run installation disc - when you're prompted to choose between Installation, Live Session and memtest, you'll see if you have 32 or 64-bit version), and then main, contrib, non-free and security. You can also get sources if you want.
Save file, and now edit preferences:
sudo geany /etc/apt/preferences
You only want to leave only three lines:
 Package: *
Pin: release a=testing
Pin-Priority: 500
Save, exit. We're getting there :)

5. Upgrade to Jessie

Reason: If you've done everything so far, you should be good to go. You just need to download Jessie packages, and you'll be in Testing land.
Solution: Just run:
sudo apt-get update && sudo apt-get upgrade && sudo apt-get dist-upgrade
After that, reboot. You should see a little bit of changes, but now you're on Jessie! 

sobota, 14 czerwca 2014

Things to do after installing CrunchBang Linux

Hey,
there are few things like this, but since it's my diary, I will keep here things that I believe are must-have for me. I will go through something like updating to Jessie, etc. just to make it easier for me later.
This post will be updated sometimes, so I don't have to open 15 pages of my blog just to remind myself what to do after having fresh installation.
So I'll also include TODO list.

TODO: Add upgrading to Jessie, brief introduction to Programs You May Want To Have(probably as a link to other post), Fix for ALT+F3 menu. Make post about how to make use of two screens and post here link to it. Than make it look pretty.

Upgrade to Jessie

Debian has 3 main distribution streams - Stable(which is good for servers, or when you want really really stable OS), Testing(which is good for casual user), and Unstable(which is good for casual and more hardcore users). The main difference is the amount of bugs, stability and version of programs. Stable has the oldest, but most stable programs. Unstable has fresh programs, bleeding edge software that isn't guaranteed to run properly. Testing is somewhere in-between. For some reasons(like compiler version, emacs version, etc.) I prefer switching to Jessie. If you want to do that, here you can find a blogs post that is meant to get you through upgrading on fresh Crunchbang. Note that if you want to go to Unstable instead, you may try following this tutorial, as genral rule is the same, but you may encounter some problems.


Install SMXI



smxi is script allowing you to install drivers/features/kernels without any problem. Instructions on how to install script can be found here.
It's good to install smxi, because it can save you a lot of trouble. Sometimes things go wrong; Your drivers break, you install wrong drivers and you can't acces GUI, you want to install other kernel version etc. That's when you go into CLI and use smxi.
It's installation is simple, usage is simple as well(it does everything for you; you are only needed to tell the script what you're up to). It helped me few times when I tried to install steam on stable and had problems with drivers.

Read about sources.list and update it


sources.list is a file which holds addresses to repositories your OS will be using to download updates, etc. There's a useful site that generates sources.list for you. You can find your sources.list in /etc/apt/sources.list .
Be warned though, that you shouldn't change repositories from one version of Debian to another(e.g. from Wheezy to Jessie) without reading about it. If you try to upgrade like that, you will most likely run into some problems. I will cover upgrading to Jessie later.


Go to #crunchbang IRC channel


Crunchbang has its own IRC channel(two, actually). You can go to IRC simply by using menu found under RMB (Network->XChat IRC Client). Than you log in to IRC. Default Crunchbang help channel is #crunchbang, and off-topic is ##crunchbang. Both channels are under Freenode, which has more channels than that(e.g. #debian, #emacs, etc.). You can go to #crunchbang and ask if you have questions or problems. Crunchbang users are hanging out there, and you may find someone who will know how to help you. I've received much help from people out there, and after some time I was able to help few people too :)


Install Dropbox or other cloud service

There's a blog post about it, so if you're interested, go and read it :)

Customize Openbox(RMB) menu

The menu is decent from the start, but sometimes you want to have more than that. For example, I use Emacs instead of Geany, so I changed shortcut. Now "Text editor" will run emacs for me.
Customizing menu is super easy. Just go to Settings->Openbox->GUI Menu Editor.
I won't cover using this tool, because it's just self-explanatory for me. Experiment with it for 2 minutes and you'll know everything you need to know. You can add new things, remove unnecessary options, or edit existing ones(like I did with emacs).
However, if it turns out it's harder than I thought, you can either ask on #crunchbang, search Web for answers, or ask me to write an article with guide.

Learn about Conky


Conky is a great tool. It allows you to print various things on screen. By default, #! comes with conky and basic configuration featuring shortcuts and basic system info. However, it can do more than that. As you can see on image, conky can be useful, starting with printing shortcuts/reminders on screen, through printing system information, to weather broadcast.
I won't get into the details in here, since there's quite a lot to cover for, and others probably explained it better than I would. If you're interested, search the Web. After reading a bit you'll know how to set it up. It's easier than it looks :)


Summary

It ain't over yet. This list will be updated, when I have time to write, and when I have new ideas. However, it's nice start. I hope this list will help you - it would help me, if it existed when I was starting my adventure with #!.

Cheers!

czwartek, 12 czerwca 2014

Chromium 35 Flash Issues

Hello,
this post will be short, because issue is easy to fix.

Lately, I've updated my Chromium to 35 version. First thing I noticed was unusual fonts - in adress bar it was intended, in others - not, but they fixed it fast.
But it also came with flash problems. I'm not fond of flash, but sometimes I do use it. Turns out Chromium changed API(if I'm correct) they use, which results in flash not working, sometimes.
Fix is rather easy - just install correct API:
http://itsfoss.com/fix-flash-player-issue-chromium-in-ubuntu-14-04/
I believe it's in nonfree Debian as well. After typing those lines everything came back to normal.
Just in case the link goes down, here's what you need to type in:

sudo apt-get install pepperflashplugin-nonfree
sudo update-pepperflashplugin-nonfree --install


That's it.
Cheers!

piątek, 6 czerwca 2014

Dropbox as your backup

Oh snap!
That's a REALLY first thing that I do every time I install Linux, yet I forgot about it completely. Well, here it comes at last...

Before I start - I'm talking about Dropbox, because I started using it - and it doesn't make me mad at it, and I can use it on my GNU/Linux and Android. If you prefer other cloud service, it works just the same. You'll be only using different software and storage place.

To those, who know what Dropbox is: you can skip this paragraph. Otherwise: Dropbox is a service that allows you to have storage in their cloud service. It can be used as backup place, place to share things, etc. Google Drive works the same as far as I know. I use Dropbox, because I got +50GB for 2 years because of some anniversary or something. And 50gb is fine for me. In this post, I'll briefly speak about how to set it up and show you one easy trick.

So, what you need to do at first is go to their website - dropbox.com , register an account and find .deb file to download, than install it. It's third-party, and CLI, so you have to find an option with GUI somewhere there. I believe it's an option that pops up during installation, so you shouldn't worry too much. From what I remember installation was pretty simple.

After you've installed Dropbox, you'll have a new folder(by default it's ~/Dropbox) waiting for data to be shared. It works as two-way folder - you can throw something in there, and it'll be uploaded to your Dropbox, or you can add something to this folder in Dropbox, and it'll be automatically downloaded.
For example, every time I make a photo with my smartphone and I'm connected to wi-fi, my phone will automatically upload it to dropbox service. Than, every time I start using my PC, the folder will update, downloading photos. So effectively I both have a backup server, and I automatically download every photo from my phone, without touching the cable. :)

So that's pretty basic. You can use it to download things, you can put some things in it. But sometimes you want to keep your files up to date all the time - e.g. you write books, or play games, and want the files containing books/save files to be up to date all the time - so if something goes wrong, you won't regret that you forgot to synchronize data.
The idea is as simple as it can be - you only need to create a symbolic link to the place you selected. You do it by using following command:
ln -s path/to/file-source path/to/destination
e.g.
ln -s ~/Books ~/Dropbox/Books

Link is something like Shortcut in Windows. It points to other file on your PC. That's why it's always up to date, and you never need to change anything inside Dropbox to update it.

Thanks for anyone who read it, and if you have questions or notes, write a comment below. Cheers!

sobota, 17 maja 2014

Setting media keys for Clementine

Hey!
I'm not too familiar with GNU/Linux OS yet. I hope this will change soon, but for now I'm always looking for some information on web. I thought that making this blog will be good option for me and other users in need to find what they are looking for.

Anyway, since it's first post, short information about my OS:
I'm using CrunchBang Linux Waldorf 11(it's a debian-based distro). It comes as wheezy-based, but I upgraded to Jessie. CrunchBang is great debian distro, I really like it. I tried Mint(Cinnamon flavor), Ubuntu, Debian by itself(with Gnome 3), and came back to Crunchbang. I guess it's just really nice distro, and community is helpful. :)

So, back to the topic! 
I am using Steelseries keyboard. It has some media buttons, which I wanted to integrate with Clementine. They don't work by default(at least not for me) except for volume keys.
I separated this into few parts.
First, let's check key names:
For this, you use "xev" program. I have it already installed, so I didn't have to download anything, but I guess it's in any Debian repositories.

After starting xev in console, you got small window which will output to console any input that it catches. I just put mouse pointer inside the window, press the buttons to get their names, and write the names down(I don't know if it's same for everyone, but e.g. my "play/pause"  button is called "XF86AudioPlay".

Once you got names of keys, you can open console and type in "man clementine", to check available commands. 

Then, you have to open menu(right mouse button) and edit rc.xml(Settings->Openbox->Edit rc.xml).
If you aren't familiar with xml, don't worry. If you're intelligent, you won't have any problem with it.
Scroll down to keyboard shortcuts. You'll notice something like this:
    <keybind key="W-A-Right">
      <action name="Execute">
        <command>cb-aerosnap --right</command>
      </action>
    </keybind>

That's shortcut for W-A-Right(which would be Window key + Alt + right arrow), and it executes command cb-aerosnap --right. It's just an example, so I won't explain what it does(it's easy to figure out anyway). What you need to know is that it's template for our clementine shortcut.
Now, you can do next step anywhere between <keyboard> and </keyboard> tags,  although I recommend doing it at the very end, so it's not scattered in the file.
Here's what I did:

    <!--My own keybinds for media keys -->
    <keybind key="XF86AudioPlay">
<action name="Execute">
<command>clementine -t</command>
</action>
    </keybind>
    <keybind key="XF86AudioNext">
<action name="Execute">
<command>clementine -f</command>
</action>
    </keybind>
    <keybind key="XF86AudioPrev">
<action name="Execute">
<command> clementine -r</command>
</action>
    </keybind>

If your media keys are named the same, you could pretty much just copy and paste it. Just to explain what I did here:
I execute clementine command with some flags. -t is called play/pause - it will start playing track or pause it, depending on current state. -f will go forward one song in playlist and immediately play it, -r does the same backwards. Any of these commands will run clementine, if it isn't running.
After that, save rc.xml and close it. Then, go again to menu, and press Settings->Openbox->Reconfigure. Voila! It should be working.

If it helped you, please let me know!
Cheers!

PS. I've searched the web, and found... my own post where I asked how to set media buttons to work with clementine :) It also had something I was looking for: volume keys!

    <keybind key="XF86AudioMute">
      <action name="Execute">
        <command>amixer set Master toggle</command>
      </action>
    </keybind>
    <keybind key="XF86AudioLowerVolume">
      <action name="Execute">
        <command>clementine --volume-down</command>
      </action>
    </keybind>
    <keybind key="XF86AudioRaiseVolume">
      <action name="Execute">
        <command>clementine --volume-up</command>
      </action>
    </keybind>