Showing posts with label Linux. Show all posts
Showing posts with label Linux. Show all posts

Friday, March 1, 2013

X11 not working with UBUNTU

As it happens I ended up deleting my /tmp file. after a reboot the machine failed to get to the graphical display (x11). After some research here is what fixed it:

(move to a shell by ctr+alt+F1 or F2 or ... F6)

sudo dpkg-reconfigure xserver-xorg

if that doesn't work you can try something a bit more drastic

sudo apt-get install -- reinstall xserver-xorg

once you get that done try starting the graphic mode:
startx


this made the cursor visible and the wallpaper. But nothing else. The solution was

sudo service gdm restart

This will get you to the password page. You might be surprised that the machine didn't recognize my passport, until you know that /tmp is the place these things are communicated to the system and it has to be writable by everyone:

chmod 777 /tmp

once that is fixed  you should try startx the previous sudo serve command it will work.



Tuesday, January 10, 2012

Running two separate verions of firefox on linux

In many cases of active web and software usage you might need to run an older version of a web browser. In this case I needed a to run Firefox 8 and I didn't want to remove my current version. here is what to do:

1- Create a separate directory and move to it:
$ mkdir /home/mzakaria/opt/firefox8
$ cd ~/opt/firefox8/

2- go to Mozilla FTP server at ftp://ftp.mozilla.org/pub/mozilla.org/firefox/releases/. and look up the release you want

3- get the folder using wget:
$ wget ftp://ftp.mozilla.org/pub/mozilla.org/firefox/releases/8.0/linux-i686/en-US/firefox-8.0.tar.bz2 (I got the one with i686 b/c I am using a 32bit machine, you can check that with the command uname -m; it will give you i686 if it was a 32bit)

4- untar the package:
$ tar xvjf firefox-8.0.tar.bz2

5-  move the unpacked folder to a folder with the name you chose (in case you are bringing more than one release)
$ mv firefox firefox8

6- Each version needs a separate user profile — otherwise, it won’t be possible to run them simultaneously, and worse, it might break the default profile which is used by the system version. For our version:
$ firefox -no-remote -CreateProfile firefox8

7- That's it! change to the folder again and run it:
$ cd firefox8/
$ ./firefox -no-remote -P firefox8

Notice that this will create a completely separate browser, you might want to move some bookmarks or certificates.


Tuesday, July 12, 2011

Editing PDF files on linux, Two solutions

Since most our meetings and seminars are presented as PDF files. I finally realised that I need some way to edit them on Linux. Something as simple as adding comments and such would do. couple of research attempts lead me to the following link:
http://www.cyberciti.biz/tips/open-source-linux-pdf-writer.html


I tried PDFedit instantly and it did deliver what it promised. the only problem is the limited selection of arrow shapes (hard to use for Feynman diagrams).


To install and run:
$ sudo apt-get install pdfedit
$ pdfedit /path/to/pdf.file & 

The code runs smoothly but has it's limits; If the document had symbols unrecognised by it (Say Japanese characters or Math symbols). It will open but with many of it's functions missing. 

Another option is Open office! They new release (3.0 and after) has a package that is able to open PDF files on a drawing pad. you will even get to stick comments and such. This approach also suffers when opening some unrecognised set of fonts or objects. It will still be fully functional but the locations will be misset up as well as missing some symbols. 

We conclude this note with Images. Where your best bed is with GIMP. Which is a standard release in UBUNTU. Once you do the changes make sure to save as xcf. then using the command:
$  convert file.xcf file.pdf

You will get he new file in the required form.

Thursday, December 16, 2010

fixing linux's shell worst pitfal: rm

When I started working with shell few yeas ago, I remember the first thing people warned me about: the rm command has no backup. So there is no copy saved in the Recycle bin or in Trash. Many books and tutorial will share this warning, and also the wisdom that no matter how careful you are. It is bound to happen that you will delete an important file wasting the work of hours or days.

Today I thought of a solution of this for my UBUNTU 9.10. We might mention that alias doesn't work since it doesn't take arguments. Also we should make the effort to find where "Trash" is, a matter that wasn't so simple [1] [2] So the next solution is to write a function and save it in .bashrc:

function rmv () { scp $* ~/.local/share/Trash/files/; }

so now:
$rmv test.f

will put it in the trash instead of deleting it forever. If you are an extensive user of rm you should be careful not to fill up the Trash directory so maybe writing a command that will clean it say every 24 hours or few days. Maybe I will do that one day...

Friday, November 19, 2010

The point behind TomBoy

I've started using TomBoy over a year ago. it sounded a very reasonable tool to make my own "wiki". As it grew larger and larger, I was wondering of a way to move it to other computers I use.


That wish materialized one day after some research. I needed to define a path where all my files are stored. It turned out that this option was killed in my version (a very old one). After some research I managed to renew it. Then you would do the following:

Edit->Preferences->Synchronization and set a path for that file.
Then you can send a copy of that file to your second machine. And through the same process, set your TomBoy to "see" that folder.
Done! and life is good.


============ update 20150212 =================

You can synchronize Tomboy with other machines using DropBox. Simply follow these instructions:

http://ubuntuforums.org/showthread.php?t=2122776

and make sure to "kill" all tomboy processes using shell before trying it.