RSS
 

Arch Linux and Flash 64 bit System Hangs

07 Oct

Hi all,

Back from another land of upgrades, pacman -Syu causing more fun and games :) Turns out my system, running on Gnome 3.2 (fallback) now crashes or hangs for 2 minutes when i open youtube, or try and play a video on iplayer.

Thinking it could be a multitude of problems, I added a new account, tried that, same issue, checked drivers, did another pacman -Syu day later, etc. After much scouring:

If your Arch or Linux install in general is freezing when you try and play anything flash or go on a flash website, do a “cat /etc/adobe/mms.cfg”. If you see:

[code]#Hardware video decoding
EnableLinuxHWVideoDecode=1[/code]

Then we have a winner. Simply “sudo nano /etc/adobe/mms.cfg”, change it to =0 instead, logout/login and try again. This appears to fix a bug in Adobe 64-bit that ocurs when it tries to use your graphics card to offload some of the video rendering.

Happy hunting,

Sam

 
 

WordPress on Arch Linux

16 Sep

Now I recently wanted to install WordPress on my Arch linux box. I must confess this guide is only part done, as I already have a working LAMP server and phpMyAdmin installed.

Installing wordpress in Arch is remarkably simple.

1. From terminal, run “sudo pacman -S wordpress”. This will toddle off and install wordpress for you into /srv/http/wordpress.

2. From a browser, navigate to your phpmyadmin server (http://localhost/phpmyadmin) for example. Login, and create  a database named “wordpress”.

3. Open a new tab, and go to http://localhost/wordpress. If you dont have an Apache instance, run “sudo /etc/rc.d/httpd start” and then “sudo /etc/rc.d/mysqld start” for SQL also.

4. Once here, it will complain about a wp-config.php file missing. Go through the GUI, and specify the database name as “wordpress”, the username as your mysql admin username (i.e. “smnet” on mine), password is your MySQL admin password.

5. Next it will generally fail to create the file and ask you to copy and paste the text from the text box into the file manually. From a terminal, run “sudo nano /srv/http/wordpress/wp-config.php” and copy and paste it in. Then do “CTRL + O” to save, and “CTRL + X” to exit.

6. Go back to “http://localhost/wordpress” and voila, its running and ready for your configuration.

Now you can get on with playing: Add a few themes for example by downloading them to /srv/http/wordpress/wp-content, then do “unzip wordpress-theme.0.0.1.zip” (if you dont have unzip, run “sudo pacman -S unzip”). Then simply, in your WordPress install, go to “Appearance” and click the newly installed theme.

HTH,

Sam

 
 

SSH Access from the Internet

26 Jul

So i wanted to setup ssh access to my box from the internet, but naturally I was reticent due to the security implications etc. So I went about setting up PSK authentication only (password login disabled).

To do this, I pretty much followed this guide here.

The long and short of it is this:

1. ssh-keygen -t dsa (on both Server and Client)

2. cat ~/.ssh/id_dsa.pub | ssh user@server “cat – >> ~/.ssh/authorized_keys” (on client; add your key to the server)

3. Then you can go ahead and start tweaking, removing user login, root login, no password authentication etc etc. Theres a lot of good info out there.

So now i’m at the situation where I have PSK login from my laptop to my server, which is pretty darn secure but i’m still worrying about “well what if someone gets in anyway?” and “How would i know?”. So I decided to find a way to get a message alert when someone does login via SSH.

Now there are 2 ways of doing this, but for both we need to: go to “/etc/ssh/” and create a file called “sshrc”. Then go into this “sshrc” file, and do one of the following:

1. sudo -u sam DISPLAY=:0.0 /usr/bin/xmessage -nearmouse “SSH by $USER from $SSH_CLIENT”

2. sudo -u sam DISPLAY=:0.0 notify-send ‘SOMEONE IS SSHing IN’ “SSH by $USER from $SSH_CLIENT”

Now the benefits of using option 1, is that the person SSH’ing in WILL NOT BE ABLE TO GET A TERMINAL SESSION until you click the OK button in the pop up. Now this is a pretty nifty security feature of sorts, but it will stop you having SSH access too if someone aint there to click OK for you.

The second one using the libnotify package, here – to pop up a window in the top right of your screen (generally) and alerts you that someone in SSHing in. This will still allow the user terminal access but let you know if you are at your desk someone is trying to get in.

HTH,

Sam