I know this issue has been discussed a lot in other topics, but most of them contain complex examples, from which I haven't been able to understand the solution. So I have the following code:

```
 \documentclass{article} 
 \usepackage[pdf]{pstricks} 
%\usepackage[usenames,dvipsnames]{pstricks}

 \begin{document}    
 \begin{pspicture}(0,-0.8)(2.0,0.8) 
 \psline[linewidth=0.04cm](0.0,0.78)(1.98,-0.78) \end{pspicture} 
 \end{document}

```

I keep getting the error message: Undefined control sequence. What am I doing wrong? (I'm using texmaker in ubuntu).