{"id":113,"date":"2020-10-22T00:37:49","date_gmt":"2020-10-22T00:37:49","guid":{"rendered":"https:\/\/ibndias.wordpress.com\/?p=113"},"modified":"2020-12-18T17:07:56","modified_gmt":"2020-12-18T17:07:56","slug":"how-to-view-dot-files-in-ubuntu","status":"publish","type":"post","link":"https:\/\/blog.derrylab.com\/index.php\/2020\/10\/22\/how-to-view-dot-files-in-ubuntu\/","title":{"rendered":"How to View .dot Files in Ubuntu"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">I was working with LLVM recently to create a callgraph using <code>opt -view-cfg<\/code>. But unfortunately it doesn&#8217;t work. Here is what I got instead:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ibndias@SHAHEEN-XPS15:~\/Documents\/Projects$ opt -view-cfg file.bc<br>WARNING: You're attempting to print out a bitcode file.<br>This is inadvisable as it may cause display problems. If<br>you REALLY want to taste LLVM bitcode first-hand, you<br>can force output with the `-f' option.<br>Writing '\/tmp\/cfg.identity-199090.dot'\u2026 done.<br>Trying 'xdg-open' program\u2026 Remember to erase graph file: \/tmp\/cfg.identity-199090.dot<br>ibndias@SHAHEEN-XPS15:~\/Documents\/Projects$ gio: file:\/\/\/tmp\/cfg.identity-199090.dot: No application is registered as handling this file<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">This means there is no application registered for handling .dot files. Even if I already installed graphviz.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Solution is, install xdot.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>sudo apt install xdot<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Now you can <code>opt -view-cfg<\/code> to see the .bc as callgraph.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I was working with LLVM recently to create a callgraph using opt -view-cfg. But unfortunately it doesn&#8217;t work. Here is what I got instead: This means there is no application registered for handling .dot files. Even if I already installed graphviz. Solution is, install xdot. sudo apt install xdot Now you can opt -view-cfg to [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[4,5],"tags":[12,15,25,36,37,66,73],"class_list":["post-113","post","type-post","status-publish","format-standard","hentry","category-linux","category-programming","tag-callgraph","tag-compiler","tag-graphviz","tag-linux","tag-llvm","tag-ubuntu","tag-xdot"],"jetpack_featured_media_url":"","jetpack-related-posts":[{"id":120,"url":"https:\/\/blog.derrylab.com\/index.php\/2020\/11\/04\/install-xilinx-in-batch-mode\/","url_meta":{"origin":113,"position":0},"title":"How to Install Xilinx using Command Line in Four Steps","author":"derry","date":"November 4, 2020","format":false,"excerpt":"I just got some problem with Xilinx 2020.1 installation on my Pop OS. The installer was stuck and gives me an error message: ibndias@shaheen:~\/Downloads$ .\/Xilinx_Unified_2020.1_0602_1208_Lin64.bin Verifying archive integrity... All good. Uncompressing Xilinx Installer............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................... Exception in thread \"SPLASH_LOAD_MESSAGE\" java.lang.IllegalStateException: no splash screen available at java.desktop\/java.awt.SplashScreen.checkVisible(Unknown Source) at java.desktop\/java.awt.SplashScreen.getBounds(Unknown Source) at java.desktop\/java.awt.SplashScreen.getSize(Unknown\u2026","rel":"","context":"In &quot;linux&quot;","block_context":{"text":"linux","link":"https:\/\/blog.derrylab.com\/index.php\/category\/linux\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":92,"url":"https:\/\/blog.derrylab.com\/index.php\/2020\/07\/18\/how-to-create-identical-image-of-usb-device\/","url_meta":{"origin":113,"position":1},"title":"How to Create Identical Image of USB Device","author":"derry","date":"July 18, 2020","format":false,"excerpt":"Hi, currently I am backing up my micro SD card contents and I'm using dd for that. You can start listing your usb device using: $ sudo fdisk -l After you get the USB address, for example mine is \/dev\/sdb, you can start creating a copy images. Here I tried\u2026","rel":"","context":"In &quot;linux&quot;","block_context":{"text":"linux","link":"https:\/\/blog.derrylab.com\/index.php\/category\/linux\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1282,"url":"https:\/\/blog.derrylab.com\/index.php\/2022\/08\/01\/problem-when-building-old-openssl-version-on-the-new-system\/","url_meta":{"origin":113,"position":2},"title":"Problem When Building Old OpenSSL Version on The New System","author":"derry","date":"August 1, 2022","format":false,"excerpt":"The old OpenSSL seems to have a problem when built using a newer system. I got this problem when compiling OpenSSL 1.1.0f on my Ubuntu 22.04. derry@G14:~\/openssl-1.1.0f$ .\/config -d shared no-asm no-hw Operating system: x86_64-whatever-linux2 \"glob\" is not exported by the File::Glob module Can't continue after import errors at .\/Configure\u2026","rel":"","context":"In &quot;Programming&quot;","block_context":{"text":"Programming","link":"https:\/\/blog.derrylab.com\/index.php\/category\/programming\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/blog.derrylab.com\/wp-content\/uploads\/2022\/08\/pexels-anamul-rezwan-1145434-scaled.jpg?fit=1200%2C800&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/blog.derrylab.com\/wp-content\/uploads\/2022\/08\/pexels-anamul-rezwan-1145434-scaled.jpg?fit=1200%2C800&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/blog.derrylab.com\/wp-content\/uploads\/2022\/08\/pexels-anamul-rezwan-1145434-scaled.jpg?fit=1200%2C800&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/blog.derrylab.com\/wp-content\/uploads\/2022\/08\/pexels-anamul-rezwan-1145434-scaled.jpg?fit=1200%2C800&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/blog.derrylab.com\/wp-content\/uploads\/2022\/08\/pexels-anamul-rezwan-1145434-scaled.jpg?fit=1200%2C800&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":2780,"url":"https:\/\/blog.derrylab.com\/index.php\/2023\/04\/25\/how-to-replace-string-in-files-without-text-editor-in-linux\/","url_meta":{"origin":113,"position":3},"title":"How to Replace String in Files without Text Editor in Linux","author":"derry","date":"April 25, 2023","format":false,"excerpt":"As a Linux user, it's important to know how to modify text files through the command line. One common scenario is changing a single line in a text file, such as enabling or disabling a feature. But what if the OS doesn't have any text editor installed at all? In\u2026","rel":"","context":"In &quot;linux&quot;","block_context":{"text":"linux","link":"https:\/\/blog.derrylab.com\/index.php\/category\/linux\/"},"img":{"alt_text":"pencil shavings","src":"https:\/\/i0.wp.com\/blog.derrylab.com\/wp-content\/uploads\/2023\/04\/pexels-photo-1237647.jpeg?fit=1200%2C800&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/blog.derrylab.com\/wp-content\/uploads\/2023\/04\/pexels-photo-1237647.jpeg?fit=1200%2C800&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/blog.derrylab.com\/wp-content\/uploads\/2023\/04\/pexels-photo-1237647.jpeg?fit=1200%2C800&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/blog.derrylab.com\/wp-content\/uploads\/2023\/04\/pexels-photo-1237647.jpeg?fit=1200%2C800&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/blog.derrylab.com\/wp-content\/uploads\/2023\/04\/pexels-photo-1237647.jpeg?fit=1200%2C800&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":135,"url":"https:\/\/blog.derrylab.com\/index.php\/2020\/11\/18\/how-to-start-a-fresh-raspberry-pi-without-monitor\/","url_meta":{"origin":113,"position":4},"title":"How to Start a Fresh Raspberry Pi without Monitor","author":"derry","date":"November 18, 2020","format":false,"excerpt":"I mean using SSH because HDMI, mouse, keyboard, and monitor will eat up the whole space in my desk. Prepare the Raspberry Pi OS Firstly we need to get our microSD card with bootable Raspberry Pi OS. I recommend using Raspberry Pi Imager to make this process easier. We just\u2026","rel":"","context":"In &quot;linux&quot;","block_context":{"text":"linux","link":"https:\/\/blog.derrylab.com\/index.php\/category\/linux\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/blog.derrylab.com\/wp-content\/uploads\/2020\/11\/image.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/blog.derrylab.com\/wp-content\/uploads\/2020\/11\/image.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/blog.derrylab.com\/wp-content\/uploads\/2020\/11\/image.png?resize=525%2C300&ssl=1 1.5x"},"classes":[]},{"id":213,"url":"https:\/\/blog.derrylab.com\/index.php\/2021\/09\/27\/git-pristine-how-to-pristine-clean-your-dirty-git-repository\/","url_meta":{"origin":113,"position":5},"title":"Git Pristine: How to Pristine Clean Your Dirty Git Repository","author":"derry","date":"September 27, 2021","format":false,"excerpt":"I found this command useful and I love this alias! git pristine, a command that will wipe any dirt on your local git copy, any untracked files, and the cache will be removed to make it pristine clean as the remote origin. Now, each time you messed up your repository,\u2026","rel":"","context":"In &quot;linux&quot;","block_context":{"text":"linux","link":"https:\/\/blog.derrylab.com\/index.php\/category\/linux\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/blog.derrylab.com\/wp-content\/uploads\/2021\/09\/pexels-pixabay-48889.jpg?fit=1200%2C800&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/blog.derrylab.com\/wp-content\/uploads\/2021\/09\/pexels-pixabay-48889.jpg?fit=1200%2C800&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/blog.derrylab.com\/wp-content\/uploads\/2021\/09\/pexels-pixabay-48889.jpg?fit=1200%2C800&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/blog.derrylab.com\/wp-content\/uploads\/2021\/09\/pexels-pixabay-48889.jpg?fit=1200%2C800&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/blog.derrylab.com\/wp-content\/uploads\/2021\/09\/pexels-pixabay-48889.jpg?fit=1200%2C800&ssl=1&resize=1050%2C600 3x"},"classes":[]}],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/blog.derrylab.com\/index.php\/wp-json\/wp\/v2\/posts\/113","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.derrylab.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.derrylab.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.derrylab.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.derrylab.com\/index.php\/wp-json\/wp\/v2\/comments?post=113"}],"version-history":[{"count":1,"href":"https:\/\/blog.derrylab.com\/index.php\/wp-json\/wp\/v2\/posts\/113\/revisions"}],"predecessor-version":[{"id":152,"href":"https:\/\/blog.derrylab.com\/index.php\/wp-json\/wp\/v2\/posts\/113\/revisions\/152"}],"wp:attachment":[{"href":"https:\/\/blog.derrylab.com\/index.php\/wp-json\/wp\/v2\/media?parent=113"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.derrylab.com\/index.php\/wp-json\/wp\/v2\/categories?post=113"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.derrylab.com\/index.php\/wp-json\/wp\/v2\/tags?post=113"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}