{"id":374,"date":"2011-11-15T04:51:47","date_gmt":"2011-11-15T04:51:47","guid":{"rendered":"http:\/\/linuxmotto.ir\/blog\/?p=374"},"modified":"2011-11-18T17:19:15","modified_gmt":"2011-11-18T17:19:15","slug":"slideshow-%d8%af%d8%b1-%d8%a8%da%af-%da%af%d8%b1%d8%a7%d9%86%d8%af","status":"publish","type":"post","link":"https:\/\/linuxmotto.io\/blog\/?p=374","title":{"rendered":"slideshow \u062f\u0631 \u0628\u06af \u06af\u0631\u0627\u0646\u062f"},"content":{"rendered":"<p>\u062e\u06cc\u0644\u06cc \u06a9\u0627\u0631 \u0639\u062c\u06cc\u0628 \u063a\u0631\u06cc\u0628\u06cc \u0646\u0645\u06cc \u062e\u0648\u0627\u0645 \u0628\u06a9\u0646\u0645. \u0686\u0647\u0627\u0631 \u062a\u0627 \u0639\u06a9\u0633 \u0628\u0627\u062d\u0627\u0644 \u06af\u06cc\u0631 \u0622\u0648\u0631\u062f\u0645 \u062a\u0635\u0645\u06cc\u0645 \u06af\u0631\u0641\u062a\u0645 \u0628\u0647 \u0635\u0648\u0631\u062a \u062a\u0635\u0627\u062f\u0641\u06cc \u0628\u06a9 \u06af\u0631\u0627\u0646\u062f\u0645 \u0631\u0627 \u0639\u0648\u0636 \u06a9\u0646\u0645. \u06a9\u0627\u0631 \u0633\u0627\u062f\u0647 \u0627\u06cc\u0647 \u0645\u062e\u0635\u0648\u0635\u0627 \u0627\u06af\u0647 \u062c\u0633\u062a\u062c\u0648 \u06a9\u0646\u06cc \u0647\u0645\u06cc\u0646 \u06a9\u0627\u0631 \u0633\u0627\u062f\u0647 \u0631\u0627 \u0647\u0645 \u0622\u0645\u0627\u062f\u0647 \u0627\u0634 \u0631\u0627 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u06a9\u0646\u06cc \ud83d\ude09<\/p>\n<blockquote dir=\"ltr\">\n<p style=\"text-align: left;\" dir=\"ltr\">#!\/bin\/bash<\/p>\n<p># Script to randomly set Background from files in a directory<\/p>\n<p># Directory Containing Pictures<br \/>\nDIR=&#8221;\/home\/behrad\/Pictures\/background&#8221;<\/p>\n<p># Command to Select a random jpg file from directory<br \/>\n# Delete the *.jpg to select any file but it may return a folder<br \/>\nPIC=$(ls $DIR\/*.jpg | shuf -n1)<\/p>\n<p># script find wich session must run next command<br \/>\nif [[ -z &#8220;$DBUS_SESSION_BUS_ADDRESS&#8221; ]]; then source &#8220;$HOME\/.dbus\/session-bus&#8221;\/*-0 &amp;&amp; export DBUS_SESSION_BUS_ADDRESS; fi<\/p><\/blockquote>\n<blockquote>\n<p dir=\"ltr\"># Command to set Background Image<br \/>\ngconftool -t string -s \/desktop\/gnome\/background\/picture_filename $PIC<\/p>\n<\/blockquote>\n<p>(\u06cc\u0647 \u0627\u0635\u0644\u0627\u062d \u06a9\u0648\u0686\u06cc\u06a9 \u062f\u0631 \u0627\u0633\u06a9\u0631\u06cc\u067e\u062a \u0627\u0646\u062c\u0627\u0645 \u062f\u0627\u062f\u0645)<br \/>\n\u062e\u0648\u0628 \u0627\u06cc\u0646 \u0627\u0633\u06a9\u0631\u06cc\u067e\u062a \u0631\u0627 \u062f\u0631 bin\/~ \u0633\u0627\u062e\u062a\u0645 \u0648 \u0628\u0639\u062f \u06af\u0630\u0627\u0634\u062a\u0645 \u062a\u0648\u06cc crontab \u06a9\u0627\u0631\u0628\u0631 .\u06cc\u0639\u0646\u06cc \u0628\u0627 crontab -e \u0627\u06cc\u0646 \u06a9\u0627\u0631 \u0631\u0627 \u06a9\u0631\u062f\u0645<\/p>\n<blockquote>\n<p style=\"text-align: left;\" dir=\"ltr\">*\/3 * * * * \/home\/behrad\/bin\/background-shuffle.sh<\/p>\n<\/blockquote>\n<p>\u0639\u06a9\u0633 \u0647\u0627\u06cc\u06cc \u06a9\u0647 \u062f\u0631 \u0645\u0648\u0631\u062f\u0634 \u062d\u0631\u0641 \u0645\u06cc \u0632\u062f\u0645 \u0631\u0627 \u0627\u0632 <a href=\"http:\/\/humdi.net\/pixels\/index.php?showimage=35\">\u0627\u06cc\u0646\u062c\u0627<\/a> \u0648 \u0627\u0633\u062a\u0631\u06cc\u067e\u062a \u0631\u0627 \u0627\u0632 <a href=\"http:\/\/www.webupd8.org\/2009\/11\/3-lines-script-to-automatically-change.html\">\u0627\u06cc\u0646\u062c\u0627<\/a> \u06af\u0631\u0641\u062a\u0645.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u062e\u06cc\u0644\u06cc \u06a9\u0627\u0631 \u0639\u062c\u06cc\u0628 \u063a\u0631\u06cc\u0628\u06cc \u0646\u0645\u06cc \u062e\u0648\u0627\u0645 \u0628\u06a9\u0646\u0645. \u0686\u0647\u0627\u0631 \u062a\u0627 \u0639\u06a9\u0633 \u0628\u0627\u062d\u0627\u0644 \u06af\u06cc\u0631 \u0622\u0648\u0631\u062f\u0645 \u062a\u0635\u0645\u06cc\u0645 \u06af\u0631\u0641\u062a\u0645 \u0628\u0647 \u0635\u0648\u0631\u062a \u062a\u0635\u0627\u062f\u0641\u06cc \u0628\u06a9 \u06af\u0631\u0627\u0646\u062f\u0645 \u0631\u0627 \u0639\u0648\u0636 \u06a9\u0646\u0645. \u06a9\u0627\u0631 \u0633\u0627\u062f\u0647 \u0627\u06cc\u0647 \u0645\u062e\u0635\u0648\u0635\u0627 \u0627\u06af\u0647 \u062c\u0633\u062a\u062c\u0648 \u06a9\u0646\u06cc \u0647\u0645\u06cc\u0646 \u06a9\u0627\u0631 \u0633\u0627\u062f\u0647 \u0631\u0627 \u0647\u0645 \u0622\u0645\u0627\u062f\u0647 \u0627\u0634 \u0631\u0627 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u06a9\u0646\u06cc \ud83d\ude09 #!\/bin\/bash # Script to randomly set Background from files in a directory # Directory Containing Pictures DIR=&#8221;\/home\/behrad\/Pictures\/background&#8221; # Command to Select a random jpg file from directory # Delete the *.jpg to select any file but it may return a folder PIC=$(ls $DIR\/*.jpg | shuf -n1) # script find wich session must run next command if [[ -z &#8220;$DBUS_SESSION_BUS_ADDRESS&#8221; ]]; then source &#8220;$HOME\/.dbus\/session-bus&#8221;\/*-0 &amp;&amp; export DBUS_SESSION_BUS_ADDRESS; fi # Command [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[17],"tags":[],"class_list":["post-374","post","type-post","status-publish","format-standard","hentry","category-scripting"],"_links":{"self":[{"href":"https:\/\/linuxmotto.io\/blog\/index.php?rest_route=\/wp\/v2\/posts\/374","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/linuxmotto.io\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/linuxmotto.io\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/linuxmotto.io\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/linuxmotto.io\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=374"}],"version-history":[{"count":5,"href":"https:\/\/linuxmotto.io\/blog\/index.php?rest_route=\/wp\/v2\/posts\/374\/revisions"}],"predecessor-version":[{"id":377,"href":"https:\/\/linuxmotto.io\/blog\/index.php?rest_route=\/wp\/v2\/posts\/374\/revisions\/377"}],"wp:attachment":[{"href":"https:\/\/linuxmotto.io\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=374"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/linuxmotto.io\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=374"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/linuxmotto.io\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=374"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}