Category: Linux (page 1 of 2)

Samba public share

How to configure a Debian based Linux distribution to share a folder with anyone on the network, with read and write access ?
Read more →

Convert PDF to PNG with enough resolution

ImageMagick logoAs ‘man convert’ states :

The convert program is a member of the ImageMagick suite of tools. Use it to convert between image formats as well as resize an image, blur, crop, despeckle, dither, draw on, flip, join, re-sample, and much more.

Read more →

Boot Linux in text console

Get rid of graphic boot on Linux with a few modifications in grub configuration : Read more →

screencast with byzance on linux

byzanz-record -c –duration=60 –x=80 –y=310 –width=800 –height=600 out.gif

Not permitted to mount disk ? [EN]

A few days ago, I started to have a very disturbing “Not permitted” message when trying to mount a usb disk from Thunar. The only way I found was to pmount the disk : not as intuitive as just clicking the disk on Thunar.

But after some googling, I found where was the real problem : udisk, who is responsible of mounting disks, uses polkit to know if I have the right to mount, or not, external disk. So, if you have the same problem, follow this steps :

sudo nano /usr/share/polkit-1/actions/org.freedesktop.udisks2.policy

(use your favorite text editor in place of nano)

Then, look for the section with “udisks2.filesystem-mount”, inside you’ll have a “defaults” section with interesting stuff :

<defaults>
<allow_any>auth_admin</allow_any>
<allow_inactive>auth_admin</allow_inactive>
<allow_active>auth_admin_keep</allow_active>
</defaults>

Now, replace all “auth_admin*” by “yes” to give access for every user, like this :

<defaults>
 <allow_any>yes</allow_any>
 <allow_inactive>yes</allow_inactive>
 <allow_active>yes</allow_active>
</defaults>

Save your modifications. Forget this annoying message !

Tmux for the impatient

New session : tmux

Attach to a session : tmux a

Detach : Ctrl+b d

Scroll : Ctrl+b PgUp/PgDown (quit with q) also can use mouse after first page up or down

Copy mode : Ctrl+b [ (quit with q)

Split horizontally : Ctrl+b “

Split vertically : Ctrl+b %

Switch pane : Ctrl+b arrow key

Resize pane : Hold Ctrl+b + arrow keys

 

install xclip so buffer copied insied tmux are also available to X : sudo apt-get install xclip

Wireless auto configuration with guessnet on Linux

The wireless tour eiffel
Assume we have access to the wifi at work and at home. How can I configure my laptop to automatically connect to the right network without using a graphical network manager ? Welcome guessnet !
Read more →

If ssh client disconnect and freeze

Add in your ~/.ssh/config :

Host *
 ServerAliveInterval 240

src = superuser.com

Horizontal rule in zsh prompt

zsh-horizontal-rule-prompt

Put in your ~/.zshrc :

PS1=$'%U${(r:$COLUMNS:: :)}%u'$PS1

src = superuser.com

Increase wordpress max file upload size

On Ubuntu/Debian distro, edit the /etc/wordpress/htaccess and add this lines :

php_value upload_max_filesize 50M
php_value post_max_size 50M
php_value memory_limit 50M