{"id":2639,"date":"2016-01-28T19:27:34","date_gmt":"2016-01-28T17:27:34","guid":{"rendered":"http:\/\/www.final-memory.org\/?p=2639"},"modified":"2016-01-28T19:30:09","modified_gmt":"2016-01-28T17:30:09","slug":"clamav-in-thunar-einbinden","status":"publish","type":"post","link":"https:\/\/www.final-memory.org\/?p=2639","title":{"rendered":"ClamAV in Thunar einbinden"},"content":{"rendered":"<p>Ab und an m\u00f6chte man auch unter Linux Dateien nach Viren scannen. Da ich meistens doch \u00fcber graphische Oberfl\u00e4chen arbeite, habe ich mir ClamAV im Thunar unter XFCE eingebunden. Dies geschieht als &#8220;Custom Action&#8221; aktiv f\u00fcr alle Dateien.<\/p>\n<p>Ich habe mich grob an die Anleitung unter <a href=\"http:\/\/blog.quiptime.com\/node\/28\" target=\"_blank\">http:\/\/blog.quiptime.com\/node\/28<\/a> gehalten. Das Skript habe ich ein bi\u00dfchen erweitert und f\u00fcr die Verwendung von zenity umgebaut.<\/p>\n<p>Das Skript sieht dann bei mir so aus:<\/p>\n<pre>\r\n<div id=\"_mcePaste\" style=\"position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow: hidden;\">#!\/bin\/bash<\/div>\r\n#!\/bin\/bash\r\n#\r\n# clamavscan 0.1, 05.10.2006\r\n#\r\n# by Siegfried Neumann, www.quiptime.com\r\n# Zenity output and desktop notify by Matthias Arndt &lt;marndt@asmsoftware.de&gt;\r\n#\r\n# Used by Thunar with a custom action.\r\n# Custom action: clamavscan %f\r\n#\r\n\r\nTITLE=\"ClamAV Scan\"\r\nSCANUSER=`whoami`\r\nLOGDATE=`date +\"%Y-%m-%d %T\"`\r\nLOGDATE_FNAME=`date +\"%Y%m%d.%H%M%S\"`\r\nLOGFILE=\"\/tmp\/clamavscan-$SCANUSER-$LOGDATE_FNAME.log\"\r\n\r\nnotify-send 'ClamAV Scan' \"started\"\r\n\r\necho \"ClamAV Scan Log   $LOGDATE \" &gt; $LOGFILE\r\necho \"\" &gt;&gt; $LOGFILE\r\necho \"Report location: $LOGFILE\" &gt;&gt; $LOGFILE\r\necho \"\" &gt;&gt; $LOGFILE\r\necho \"--------------------------------------------------------------------------\" &gt;&gt; $LOGFILE\r\necho \"\" &gt;&gt; $LOGFILE\r\nchmod 600 $LOGFILE\r\n\r\nclamscan -r \"$1\" &gt;&gt; $LOGFILE \r\n\r\nif [ $? -eq 0 ]\r\nthen\r\n\tnotify-send 'ClamAV Scan' \"No virus found\"\r\nelse\r\n\tzenity --title \"$TITLE $LOGDATE\" --error --text=\"One or more virii found!\"\r\nfi\r\n\r\nzenity --title \"$TITLE $LOGDATE\" --text-info --width 500 --height 400 --filename=$LOGFILE\r\n\r\ncase $? in\r\n  0)\r\n    echo \"Finished.\";;\r\n  1)\r\n    xdg-open $LOGFILE;;\r\n  255)\r\n    echo \"Box closed.\";;\r\nesac<\/pre>\n<p><code> <\/code><\/p>\n<div id=\"facebook_like\"><iframe src=\"http:\/\/www.facebook.com\/plugins\/like.php?href=https%3A%2F%2Fwww.final-memory.org%2F%3Fp%3D2639&amp;layout=standard&amp;show_faces=true&amp;width=500&amp;action=like&amp;font=segoe+ui&amp;colorscheme=light&amp;height=80\" scrolling=\"no\" frameborder=\"0\" style=\"border:none; overflow:hidden; width:500px; height:80px;\" allowTransparency=\"true\"><\/iframe><\/div>","protected":false},"excerpt":{"rendered":"<p>Ab und an m\u00f6chte man auch unter Linux Dateien nach Viren scannen. Da ich meistens doch \u00fcber graphische Oberfl\u00e4chen arbeite, habe ich mir ClamAV im Thunar unter XFCE eingebunden. Dies geschieht als &#8220;Custom Action&#8221; aktiv f\u00fcr alle Dateien. Ich habe mich grob an die Anleitung unter http:\/\/blog.quiptime.com\/node\/28 gehalten. Das Skript habe ich ein bi\u00dfchen erweitert &hellip; <a href=\"https:\/\/www.final-memory.org\/?p=2639\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;ClamAV in Thunar einbinden&#8221;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[27,24,88],"tags":[],"class_list":["post-2639","post","type-post","status-publish","format-standard","hentry","category-asm-software","category-linux","category-xfce"],"_links":{"self":[{"href":"https:\/\/www.final-memory.org\/index.php?rest_route=\/wp\/v2\/posts\/2639","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.final-memory.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.final-memory.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.final-memory.org\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.final-memory.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2639"}],"version-history":[{"count":7,"href":"https:\/\/www.final-memory.org\/index.php?rest_route=\/wp\/v2\/posts\/2639\/revisions"}],"predecessor-version":[{"id":2646,"href":"https:\/\/www.final-memory.org\/index.php?rest_route=\/wp\/v2\/posts\/2639\/revisions\/2646"}],"wp:attachment":[{"href":"https:\/\/www.final-memory.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2639"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.final-memory.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2639"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.final-memory.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2639"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}