Inlägg

Visar inlägg från januari, 2015

Commercial software on Linux - RAR

I found that I had an old registration key for WinRAR laying around. Since I don't use Windows any more at home, I checked and found that there is indeed a commercial Linux version of the software available nowadays. RAR is a proprietary archive format that was widely used in the 90's and the next decade when the Internet became a popular place to share software and media files. It has better compression ratio than ZIP, has strong encryption and very good error recovery capabilities. I have some memories from my time as a student of keeping a WinRAR binary on a floppy and use it to decompress and compress files transferred from and to the Internet. I'm not going to debate over FOSS vs. commercial software in this post. If we weigh in such arguments, there are no reasons to use anything else than the LGPL licensed 7Z (p7zip) or tar with bzip2, gzip or xz (and their parallel variants), but that was not the point of this post. There is also a freeware unrar program and l...

Preventing normal users from Shutting Down or Rebooting PC

The default policy in linux is often that normal users can shut down or reboot a PC, even if other people are logged in. When using a desktop PC as a server or if you often leave your applications open, you don't want that to happen. This is a question that comes up many times on the Internet. The problem is that the components in linux change and not every distribution uses the same components. In linux, only root has the power to shut down or reboot. Many linux distributions use Policykit for rules to override this and let the normal users shut down and reboot. In Fedora 21, to override the default rules, create a new rule with the following command: sudo nano /etc/polkit-1/rules.d/60-noreboot_norestart.rules  Paste the following text: polkit.addRule(function(action, subject) {     if (action.id == "org.freedesktop.login1.reboot" ||         action.id == "org.freedesktop.login1.reboot-multiple-sessions" ||   ...